Dense Rank and Object types (oracle 9i and 10g difference).

Hi all,
One of my queries in my procedure uses scalar subqueries and object types.
The code works fine in 10g but not in 9i. Both Object types and Dense_rank used below are present in both 9i and 10g.
The following is a part of a bigger query.. but this is what it comes down to when I zero in on the error.
-- In both 9i and 10g...
CREATE OR REPLACE TYPE t_audit_type as object(
   add_tms date,
   add_user_id varchar2(20),
   order member function match (t t_audit_type) return integer
Type created.
CREATE OR REPLACE TYPE BODY t_audit_type as
order member function match   (t t_audit_type) return integer is
begin
  if add_tms < t.add_tms then
     return -1;
  elsif add_tms > t.add_tms then
    return 1;
  else
    return 0;
  end if;
end;
end;
Type body created.
create table t ( x int, y date);
insert into t values(1, sysdate);
insert into t values(1, sysdate+1);
commit;In Oracle 10g..
select min(t_audit_type(x,y))
keep (dense_rank first order by x) result
from t;
RESULT(ADD_TMS, ADD_USER_ID)
T_AUDIT_TYPE('19-JAN-10', 'User2')In Oracle 9i....
9i> select min(t_audit_type(x,y))
  2   keep (dense_rank first order by x) result
  3   from t;
select min(t_audit_type(x,y))
ERROR at line 1:
ORA-03113: end-of-file on communication channelHave any of you seen this before..? The connection is always being terminated when I run this command.?!

Thanks Dom for your reply.
Here is the message I found in the trace file for the error.
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [0000000100D72F84] [SIGSEGV] [Address not mapped to object] [0x000000018] [] []
Current SQL statement for this session:
select min(t_audit_type(x,y))
       keep(dense_rank first order by x)x
from tI will look in metalink and see if this has been addressed before.
Thanks...!

Similar Messages

  • XML attributes and object types

    I want to create an XML Document of the following form
    <family>
    <parent attr1="val1">
    <child attr2="val2" attr3="val3"/>
    </parent>
    </family>
    Using object table and object type (for the child element), I am able to produce the following XML Document (with a "select * from family" query)
    <family> <!-- rowset -->
    <parent> <!-- row -->
    <attr1>val1</attr1>
    <child>
    <attr2>val2</attr2>
    <attr3>val3</attr3>
    </child>
    </parent>
    </family>
    The question is: how am I going to query these data so that the "attr" elements are mapped to attributes (using XSU only, without XSLT)?
    I have already tried the following:
    1. Using
    SELECT attr1 as "@attr1",
    f.child.attr2 "@attr2",
    f.child.attr3 "@attr3"
    FROM family f
    all the attributes are obviously appended to the "parent" element.
    2. Using nested table for "child" and the following query
    SELECT attr1 as "@attr1",
    CURSOR (
    SELECT n.child.attr2 as "@attr2", n.child.attr3 as "@attr3"
    FROM TABLE(f.child n)
    ) AS "child"
    FROM family f
    I am getting the following document
    <family>
    <parent attr1="val1">
    <child>
    <child_ROW attr2="val2" attr3="val3"/>
    </child>
    </parent>
    </family>
    Is there a smart SQL query to produce the desired document? What data types
    is it recommended to use to define my db schema (object types, nested tables...)?
    Thank you in advance
    null

    Finally, I got the desired XML format output from relational tablse using schema based XMLType views.
    Wherein I created Object Types from relational table, generated the schema for the Object type, registered the schema and finally created XMLType Views for populating the XML data from Relational Tables.
    I guess, you all might aware of my problem, where I got struck. Instead of printing the data in XML format I am successful in generating the XML format data Using the Query Select from BLABLA_Type_view* . I am able to print the number of rows, that I require which is in the fallowing format.
    Column Name
    1. SYS.XMLTYPE ----- As a row
    The view I am querying for is printing the data in a string format, where in I got to do the fallowing query
    SELECT SYS.XMLTYPE.getStringVal(OBJECT_VALUE) FROM BLABLA_Type_view. Which ultimately gave me the required data in XML format with tags.
    Thanks for every one who tried to give a try to solve, especially "mdrake"

  • Help in using record type and object type

    Hi Experts,
    I am new to object types and record types.
    I want to return the output of this query using one OUT parameter
    from the procedure using RECORD type or OBJECT type.
    with out using refcursor.
    SELECT empno,ename,sal FROM emp WHERE deptno=30;
    Let us assume the query is returning 50 records.
    I want to send those 50 records to OUT parameter using record type or object type.
    Please provide the for the requirement code using RECORD TYPE and OBJECT TYPE separately.
    Your earliest response is appreciated.
    Thanks in advance.

    Hi All,
    I have tried this.But it ising not work
    CREATE OR REPLACE PACKAGE maultiplevalues_pkg
    IS
    TYPE t_record IS RECORD
    (empno emp.empno%TYPE,
    ename emp.ename%TYPE,
    sal emp.sal%TYPE);
    V_RECORD t_record;
    TYPE t_type IS TABLE OF V_RECORD%TYPE;
    PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
    dept_result OUT t_type);
    END;
    CREATE OR REPLACE PACKAGE body maultiplevalues_pkg
    IS
    PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
    dept_result OUT t_type)
    is
    begin
    dept_result :=t_type();
    for I in(
    select EMPNO,ENAME,SAL from EMP WHERE deptno=p_deptno
    LOOP
    dept_result.extend;
    dept_result(i).empno :=i.empno;
    dept_result(i).ename :=i.ename;
    dept_result(i).sal :=i.sal;
    END LOOP;
    END;
    END;
    Please help me OUT return multiple values through single OUT variable in a procedure.
    Thanks.

  • Varray, Nested Table and Object types in OWB r2

    Requirement:
    Flat file with repeating groups of nested content need to move into Object Relational ORACLE table (using varray or nested tables - no preference). The data will be loaded, then mapped/transformed into a richer O-R output to directly produce XML outputs.
    Problem:
    Generated PL/SQL "seems" to do the correct thing, but deployment errors show failures on mapping of collections (varrays, NTs or OTs) and in sqlplus recompiling the PKB still gives the errors. Is this a PL/SQL generator error, or is there a more meaningful example of using CONSTRUCT OBJECT operator than the embedded odcumentation - it is a simple type (single instance) and not a variable repeating group of nested data.
    Anyone had any success with these, or know of any collateral to assist in the process. Thanks.

    The process we are following is very simple. We are talking 10 columns from a source flat file table and wish to map this into a Varray/Nested table, with one column of Varchar2(10).
    When you create your map in OWB, select the construct object, you have to choose an object type - it does not allow you to select a VARAAY or NESTED table.
    I have then created an object defined in the same structure as the VARRAY/NESTED table - I have then made the VARRAY/NESTED table of this TYPE.
    Example:
    CREATE OR REPLACE TYPE "O_REL_PUB_INDEX" AS OBJECT (
    X_REL_PUB_INDEX_1 VARCHAR2(10))
    CREATE OR REPLACE TYPE "V_REL_PUB_INDEX" AS VARRAY(15) OF O_REL_PUB_INDEX
    In OWB you can then select O_REL_PUB_INDEX when creating the 'Contruct Object'.
    The problem I have is that when I map to my target column of type V_REL_PUB_INDEX and DEPLOY my map I get the following errors taken from OWB control centre
    Name
    Action
    Status
    Log
    TEST
    Create
    Warning
    ORA-06550: line 2931, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 3174, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 401, column 7:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 643, column 13:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 7221, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 7464, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    Any ideas? anyone succesfully mapped to either a VARRAY or an NESTED TABLE target column?

  • Oledb and path length - Oracle client and networking components ...

    Hello,
    I've been suddenly getting the
    "Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation."
    error when trying to connect to an oracle 9.2 database using the msdaora oledb provider.
    "..ora92/bin" is in my PATH environoment variable and the hints about setting read and execute permissions on the ..ora92/bin direction didn't work for me. However, what did do the trick, was reducing the length the PATH environement variable to under 182 characters.
    Anybody else seen this that can explain what's gonig on here?
    Erik

    Hello Kamal,
    Thanks for your reply
    My system looks like this:
    OS: MS Windows XP Professional Service Pack 2
    msdaora version: 2.81.1117.0
    This problem has only recently surfaced, but has now appeared on at least two other systems as well as my own. Any system changes must have happened on all three systems. I have "automatic updates" setup on my computer and they maybe setup on the other computers - could the be responsible for breaking oledb?
    Other things I have tried:
    The Oracle Oledb provider is also not working. It gives me the error:
    "OraOLEDBpus.dll: the specified module could not be found"
    When I reduce the size of the PATH variable it works too.
    I am always able to run executables from the ../ora92/bin directory. So the path is only being wrongly interpreted by the Oledb providers.
    Erik

  • How do I copy text and objects from pages to and paste into Email, objects don't show in Email

    Anyone know how I copy text and objects from pages and paste into Email, objects don't show in Email, thanks

    You can't expect Mail to support all the objects of Pages which can include anything up to charts generated from spreadsheet tables.
    Even if Mail was a superset of Pages, what would the recipients who don't have either Mail or Pages, make of it?
    Peter

  • Task dependencies and scheduling in Oracle projects and project management

    Am I correct in the belief that Oracle projects/project management does not have the ability to create, manage and track dependencies between tasks in a project ? And to achieve that micro level of planning I need to use something like Microsoft Project Integration ?

    Gordon,
    Project integration is the link between Oracle Projects and MS Projects.
    If you want to define dependencies between tasks, MS Project is best bet
    for you.
    Cheers,
    Gopal
    [email protected]
    www.sagss.com

  • Download and installation of Oracle 8i and Developer 6i

    I have Windows XP Home Edition. When I went to the download site to extract Oracle 8i and Developer 6i and was instructed to choose my environment I did not know which to select as neither had WIN XP. Which should I choose.
    Also, what known problem and work arounds should I expect, if any. I need to get this loaded for a class by Friday, Feb 1. Can anyone help? Thanks in advance.
    Shirley

    Hello,
    Please repost this question in the appropriate section of the Discussion Forum.
    This forum is for general suggestions and feedback about the OTN site.
    For customers with paid support (Metalink) please go to:
    http://www.oracle.com/support/metalink
    Regards,
    OTN

  • Backing up all data and objects of Oracle 10g Express Edition...

    Hi,
    I have tables, packages, views, procedures, etc. in Oracle 10g Express Edition, running on Windows XP. I would like to create a backup of the complete database (objects, relationships, all data, etc) into a file that I can restore in case the database crashes.
    What do I do?
    Thanks.

    markk2 wrote:
    I am actually using it for Production. Yes, I would need objects and data.I would suggest to look at the Standard Edition as well if you are using it for production.
    Is there a way to backup everything without data and then backup everything with data? Also, is there a way to restore everything without data and then restore everything with data?What's the meaning of "backup everything withiut data" and "then backup everything with data" ? The data is in the tables alone. The rest of the objects are not containing data but are using it, be it views, procedures etc. There is no such restore like without data. Without data, all what you would be getting would be structures of the tables which is going to be of no use. The export/import tool, is a simple tool which can put the tables (and other objects as well) along with their data in your dumpfile . In the situation of loss of a table, you can do an import from that dump file and you can restore the table back(with or without data, depends on the choice of yours while running Import command) . But this is just going to be a logical recovery of the object(s). For a complete database, it's better to use RMAN which would copy the datafiles and keep it with itself. Later, when you have a crash, you can restore those files to get teh database recovered. But if you want complete security, its better to put your db in the archive log and then do the backup along with the archive log files.
    HTH
    Aman....
    How to do this exactly? Thanks!

  • Ui configuration at run time using role config key and object type

    Hi experts,
    Let me start by admitting that I am very new to the crm webui. I have a requirement in which I need to create a few z business roles and unique role config keys for them. And I have been given some requirements like below.
    - Access to Account, Service Request, Knowledge Article and FACT sheet data
    - Able to display all service requests.
    below is the processing logic that I have been told.
    Using the role config key, different view configurations would be created for respective components in
    the component workbench.
    Based on the business role, respective role config key would be picked up and the corresponding
    view would be displayed on UI.
    In addition to this, in the IMPL class of the component work bench, DO_CONFIG_DETERMINATION
    method could also be used to specify which role config should be picked up.
    Do they mean that using same role config key, I need to create more than one UI configuration? I was also told by some one that I need to create the configuration according to ui objects and sub object and then inside the  DO_CONFIG_DETERMINATION methode, I can check the role config key and hard code the ui object and the sub object. But I do not know how to create them.
    Could anyone tell me from where I can start and how to achieve this task?
    I apologize if my question is very basic.

    Do they mean that using same role config key, I need to create more than one UI configuration? I was also told by some one that I need to create the configuration according to ui objects and sub object and then inside the DO_CONFIG_DETERMINATION methode, I can check the role config key and hard code the ui object and the sub object. But I do not know how to create them.
    Could anyone tell me from where I can start and how to achieve this task?
    I apologize if my question is very basic.
    You can do the following
    a) Go to the view you want to create a new configuration.
    b) Choose 'Copy Configuration' .
    c) There you would be asked to enter the Role Config Keys , Object Name & Sub Object Name. You can choose your own names for Object Names & Sub Object Name.
    d) go to DO_CONFIG_DETERMINATION. There based on your logic you can load the configurations this way
            IF (your_condition) EQ abap_true.
              CALL METHOD me->set_config_keys
                EXPORTING
                  iv_object_type          = 'your_object_type'
                  iv_object_sub_type      = 'your_sub_obj_type'
                  iv_propagate_2_children = abap_false.
    Regards
    Kavindra

  • Directory structure and files in Oracle Application server 10g and 11g

    Hi all,
    I am doing a lab migration from 10g to 11g based on the use of JAXB. There were some directory structures used in 10g to store the JAXB jar files and some other custom jar files. I want to know the equivalent folder structures in SOA 11g server. The 10g server directories are mentioned below:-
    1.<OracleAS_Home>\webservices\lib.
    2. server.xml located at <OracleAS_Home>\j2ee\home\config in 10g. Where can I find the equivalent file to "server.xml" in 11g server?
    3. <OracleAS_Home>\bpel\system\classes\com\oracle\bpel\xml\util.
    4. <OracleAS_Home> \bpel\system\classes.

    Here are the equivalents as per best of my knowledge:
    1. <WebLogic Home>\server\lib
    For example, D:\Middleware\wls1036\wlserver_10.3\server\lib
    2. config,xml located at <Domain_Home>\config\
    For example, D:\Middleware\wls1036\user_projects\domains\ArunBaseDomain1036\config\config.xml
    3. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you install the BPEL product. Since, I have not installed BPEL/SOA, I am not very sure.
    4. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you installed the BPEL product.
    Also, I would recommend that you consider using ORACLE Smart Upgrade (JDeveloper component) to help you with the upgrade process. It exactly points out these mappings of file/directory structures AND the necessary configuration changes as well.
    If you are requirement, is only about making the library jars available to your application, then consider reading the below discussion.
    Re: XIncludeAwareParserConfiguration cannot be cast to XMLParserConfiguration
    Arun

  • Data export and import between Oracle 9 and 10

    Hi all,
    I have been working with this for weeks. Reading posts and oracle doc. Finally, bugs block my way. Hope you can help me out. Many Thanks.
    Situation: I need to export data of one table from Oracle 10.2.0.1 to Oracle 9.2.0.8
    Background: Oracle 10.2.0.1 at Machine 1(IBM AIX), Oracle 9.2.0.8 at Machine 2(don't know, maybe Stratus), My local Machine(XP)
    Method 1: using SQL developer (MWB)
    Bug: there is CLOB field in the target table. All content of CLOB field become "(CLOB)" and data lost. This is a logged bug.
    Solution: give up using SQL developer
    Method 2: using Oracle 10 client exp & imp and remote from my local machine XP
    Bug: PLS-00302-SET_NO_OUTLINES must be declared
    Solution: using Oracle 9 client
    Method 3: using Oracle 9.2.0.1 client, since my local machine is XP
    Bug: EXP-00003: no storage definition found for segment (target DB run Oracle 9.2.0.8)
    Solution: using Oracle 9.2.0.8 client
    Problem: Oracle 9.2.0.8 client is for Stratus x86 only? I have no idea what Stratus is except believing it is a server machine.
    My senior told me to use sqlldr. But I just used it once for 3rd party DB for import. Can sqlldr export data?
    I would like to ask for any suggestions or/and solutions. Many Thanks!
    Best regards,
    Philip

    Hi OrionNet,
    Thank you very much for your helping and my problem solved. Here is my version of spool setting modifying from OrionNet example.
    set echo off
    set newpage 0
    set space 0
    set pagesize 0
    set long 2000000 //this is for CLOB, set it enough large to avoid missing data
    set feed off
    set head off
    set trimout on
    set trimspool on
    spool C:\spool.dat
    SELECT col1||'<EOFD>'||col2||'<EOFD>'||col3||'<EORD>' //this is separator for sqlldr
    FROM tab1
    WHERE col2 = 'XYZ';
    spool off
    and control file for sqlldr
    load data
    infile 'spool.dat' "str '<EORD>'" //ROW separator
    append
    into table tab1
    fields terminated by '<EOFD>' //FIELD separator
    trailing nullcols
    col1,
    col2,
    col3
    I think that using spool and sqlldr is the most "painless" method for Oracle 10g to 9i data move unless you are DBA of both DBs.
    Please share If anyone have easier/safer method. I am just crazy to migrate backward Oracle version.
    Thanks again,

  • Trying to add oinstall and dba (for Oracle Database and Enterprise Manager) to my LDAP account

    I want to add groups to my LDAP user account abc. Currently I have uid=243782(abc) gid=10(wheel) groups=1275(nsn-emp),9834(nsn-moh),10(wheel), but I want groups oinstall, oper and dba added.
    According to the database installation document, local os group must include oinstall and dba.
    The following local operating system groups and users are required if you are
    installing Oracle Database:
    ■ The Oracle Inventory group (typically, oinstall)
    ■ The OSDBA group (typically, dba)
    ■ The Oracle software owner (typically, oracle)
    I tried to add abc groups oinstall and dba using root user, but it failed.
    Could you please inform me how to add these groups?
    Thanks.
    lf

    Folks,
    Hello. Thanks a lot for replying. I do the following command: [user@localhost bin]$ wget http://localhost.localdomain:1158/em
    The command returns the message:
    --11:36:33-- http://localhost.localdomain:1158/em
    Resolving localhost.localdomain... 127.0.0.1
    Connecting to localhost.localdomain|127.0.0.1|:1158... connected.
    HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
    Length: unspecified
    Saving to: `em'
    [ <=>                                                                                                              ] 7 --.-K/s in 0.002s
    11:36:33 (4.15 KB/s) - Read error at byte 7 (Connection reset by peer).Retrying.
    --11:36:34-- (try: 2) http://localhost.localdomain:1158/em
    Connecting to localhost.localdomain|127.0.0.1|:1158... connected.
    HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
    Length: unspecified
    Saving to: `em.1'
    100%[=================================================================================================================>] 7 --.-K/s in 0s
    11:36:34 (16.8 KB/s) - Read error at byte 7 (Connection reset by peer).Retrying.
    The above message repeats again and again until finally returns the following message:
    11:39:02 (40.2 KB/s) - Read error at byte 7 (Connection reset by peer).Giving up.
    In browser, http://localhost.localdomain:1158/em cannot display and pop up a Windows with the message: You have chosen to open whicn is BIN file from http://localhost.localdomain:1158 What sholud FireFox do with this file ? Save to Disk ?
    My question is:
    I don't know how to display http://localhost.localdomain:1158/em in Browser. How to solve the issue ?
    Thanks.

  • So I have apps I need to upload and apps I need to download and when i try it asks for my billing info and i type it in and it says incorrect? helpp

    helpp!!

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico my first language is Spanish. I do not speak English, however I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Are you putting in the address where the bank sends the monthly statement?
    Apple's servers are very picky about the format of the address. If you live in the USA, then the server is expecting the style that the US Postal Service uses. One way to do this is to use the USPS ZIP Code lookup service;
    https://tools.usps.com/go/ZipLookupAction!input.action
    Enter the address to look up the ZIP code and then copy the exact USPS output into your iTunes account information.

  • Different EBS Adapter interfaces generate same object types differently

    Hi,
    We are experiencing the following behavior when using two different interfaces that are both generated from the E-Business Suite Adapter.
    Wrapper packages and object types are generated and created in the database. But in both cases the generator creates a type called gme_api_pub_rowtype_sql1.
    Alas, that same type has a different specification depending on the interface. Hence, one of the api's has compile errors as it expects the type to have additional parameters.
    Has anyone experienced the same behavior?
    More important: is there a way to overcome the problem?
    Thanks, Sjoerd

    To add to that:
    We are not willing to have separate schemas for each of the EBS Adapter interfaces so that we can have multiple instances / occurrences of type gme_api_pub_rowtype_sql1, i.e. one per schema.
    This would quickly turn into a maintenance nightmare.
    Thanks, Sjoerd

Maybe you are looking for