ORA-31061 error while creating XMLType table with virtual column

I'm not calling it frustration ;)
but still... what about this one :
SQL> select * from v$version;
BANNER
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
CORE    11.2.0.2.0      Production
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL> create table test_virtual of xmltype
  2  xmltype store as binary xml
  3  virtual columns (
  4    doc_id as (
  5      xmlcast(
  6        xmlquery('/root/@id'
  7        passing object_value returning content)
  8        as number
  9      )
10    )
11  )
12  ;
Table created.Now, on the latest version :
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL> create table test_virtual of xmltype
  2  xmltype store as binary xml
  3  virtual columns (
  4    doc_id as (
  5      xmlcast(
  6        xmlquery('/root/@id'
  7        passing object_value returning content)
  8        as number
  9      )
10    )
11  )
12  ;
      passing object_value returning content)
ERROR at line 7:
ORA-00604: error occurred at recursive SQL level 1
ORA-31061: XDB error: dbms_xdbutil_int.get_tablespace_tab
ORA-06512: at "XDB.DBMS_XDBUTIL_INT", line 1002Is there something I should be aware of?
Right now, I'm just evaluating the version so I can't submit any SR.
Thanks for anyone trying to reproduce the issue.

Just tested again on a new installation (64-bit server).
It works :
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE     11.2.0.3.0     Production
TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
SQL>
SQL> create table test_virtual of xmltype
  2  xmltype store as binary xml
  3  virtual columns (
  4    doc_id as (
  5      xmlcast(
  6        xmlquery('/root/@id'
  7                 passing object_value returning content)
  8        as number
  9      )
10    )
11  );
Table created
Now I'll try to see what are the differences between the two installations.
Thanks Dan and Marco for looking into this.
Edited by: odie_63 on 2 mai 2012 15:51

Similar Messages

  • ORA-00939 when creating XML table with Virtual Columns

    Getting error on creating table with VIRTUAL COLUMNS:
    Error at Command Line:4 Column:31
    Error report:
    SQL Error: ORA-00939: too many arguments for function
    00939. 00000 - "too many arguments for function"
    Without VIRTUAL COLUMNS works fine.
    Where to start?
    Is it possible to add Virtual Columns after a table is created?
    CREATE TABLE TDS_XML OF XMLType
    XMLSCHEMA "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"
    ELEMENT "TDSTestData"
      VIRTUAL COLUMNS
      TESTID AS (
        XMLCast(
                  XMLQuery('declare default element namespace "http://xmlns.abc.com/tds/TDSSchemaGen2.xsd"; /TDSTestData/TestID' PASSING OBJECT_VALUE RETURNING CONTENT)  AS VARCHAR2(32)
       )SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 30 20:17:29 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for 64-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL>

    victor_shostak wrote:
    Figured, Virtual Columns work only for Binary XML.They are only supported, currently, for Binary XML.

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • ORA-00600 problem when create XMLType table with registerd schema

    Hi,
    I am using Oracle9i Enterprise Edition Release 9.2.0.4.0 on RedHat Linux 7.2
    I found a problem when I create table with registered schema with follow content:
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="body.content">
              <xs:complexType>
                   <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element ref="p"/>
                        <xs:element ref="hl2"/>
                        <xs:element ref="nitf-table"/>
                        <xs:element ref="ol"/>
                   </xs:choice>
                   <xs:attribute name="id" type="xs:ID"/>
              </xs:complexType>
         </xs:element>
    Does Oracle not support element reference to other element with dot?
    For instance, body -> body.content
    Thanks for your attention.

    Sorry, amendment on the schema
         <xs:element name="body">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="body.head" minOccurs="0"/>
                        <xs:element ref="body.content" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element ref="body.end" minOccurs="0"/>
                   </xs:sequence>
                   <xs:attribute name="id" type="xs:ID"/>
                   <xs:attribute name="class" type="xs:NMTOKENS"/>
                   <xs:attribute name="style" type="xs:string"/>
              </xs:complexType>
         </xs:element>

  • Dropping a column in composite xmltype table with virtual column

    Hello,
    i found some interesting behavior. I have a table with xmltype column and a virtual column. If i drop a column, which has an index smaller than the index for the xmltype column, than the virtual column reference for xmltype column is not changed.
    select * from v$version;
    drop table t_xml purge;
    create table t_xml( c1 number,
                        c2 number,
                        cxml xmltype,
                        c3 number,
                        xmlflag number as (nvl2(cxml,1,0)));
    select * from t_xml;
    alter table t_xml drop column c2;                    
    select * from t_xml; The 2nd select will result in error:
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> alter table t_xml drop column c2;                    
    Tabelle wurde geändert.
    SQL>
    SQL> select * from t_xml;
    select * from t_xml
    FEHLER in Zeile 1:
    ORA-00904: "SYS_NC00004$": ungültiger BezeichnerNow the virtual column xmlflag references still the old hidden column for cxml (SYS_NC00004$). It not references the new hidden column, which is now SYS_NC00003$.
    I think, it is a bug! Can someone inform oracle? I have no access to metalink.

    Hi,
    Please try this code:
    loop at int_inv into wa_inv.
        lv_count = lv_count + 1.
        AT END OF posnr.   <------- The field you want to sum..
          gs_total-posnr      = wa_inv-posnr.
          gs_total-cov_total  = lv_count.
          APPEND gs_total TO gt_total.
          CLEAR : gs_total,
                  lv_count,
                  wa_inv.
        ENDAT.
      ENDLOOP.

  • Dbms_xmlschema.registerschema, (ORA-31084: error while creating table )..

    Hello,
    I have some problems with dbms_xmlschema.registerschema
    My database is: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    My XSD schema is (SEPA pain.002.001.03.xsd) also available on this url: http://code.google.com/p/leontestbed/source/browse/trunk/bc2/sample/Schema/pain.002.001.03.xsd?r=241
    After
    begin
       DOK_XML_UTIL.p_vnesi_xsd_blob(401941242); -- store a XSD on file system from blob field
       dbms_xmlschema.registerschema(
        schemaurl => 'http://localhost/TEST1.XSD',
        schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
        csid => nls_charset_id('AL32UTF8'));
    commit;
    end;I get:
    ORA-31084: error while creating table "INIS_PROD"."Document2781_TAB" for element "Document"
    ORA-02320: failure in creating storage table for nested table column "XMLDATA"."CstmrPmtStsRpt"."OrgnlPmtInfAndSts"
    ORA-01792: maximum number of columns in a table or view is 1000
    ORA-02310: exceeded maximum number of allowable columns in table
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 65
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 136
    ORA-06512: at line 4
    What I'am doing wrong or what is the reason for this error..

    Arrgghhh.....
    begin
       DOK_XML_UTIL.p_vnesi_xsd_blob(401941242);
       dbms_xmlschema.registerschema(
        schemaurl => 'http://localhost/TEST1.XSD',
        schemadoc => bfilename('ETAX_LOAD','TEST1.XSD'),
        csid => nls_charset_id('AL32UTF8')
        , local => true
      , genTypes => false
      , genTables => false);
    commit;
    end;sorry...

  • ORA-12571 error while creating packages from Windows clients

    Hello,
    We are facing the ORA-12571 error while creating / replacing packages from Windows Clients connected to a 8.1.7.2.0 db on a Solaris server.
    However, there are
    1. no errors in connecting and creating transactions from a Sql session
    2. no errors in creating / replacing unwrapped/wrapped small (few lines) packages
    3. no errors in connecting from a Unix session (remote telnet sessions inclusive).
    This happens only when creating wrapped/unwrapped packages, source code of which is greater than 500 kb approx.
    Can somebody help me resolve this issue. Any Help would be greatly appreciated.
    Regards.
    Lakshmanan, K

    Update: I had unintentionally left my custom tablespace in READONLY state after an earlier experiment with transportable tablespaces. After putting the tablespace back into READ WRITE mode and creating a new template, I was successfully able to create a new db from the template.
    I'm still a little curious why this procedure wouldn't work properly with a READONLY tablespace, however.
    Ben

  • HOW TO CREATE A TABLE WITH 800 COLUMNS?

    I have to create a table with 800 columns.I know the create statement to create a table but it will take more time.
    So tell me the other method.

    If you really think that you have to store 800 values for a given entity, it would be a wise idea if you store you information in columnar fashion. Make a main table and a attribute table, keep the primary identifier in the  main table and store other attributes in the attribute table where you can keep the primary key of the first table as foreign key (not necessary) to maintain the relationship.
    eg.
    emp_id
    emp_name
    dob
    city
    state
    country
    pincode
    1
    Mr X
    01/01/1990
    ABC
    ZXC
    MMM
    12345
    Can be stored as
    Main Table
    emp_id
    emp_name
    1
    Mr X
    Attribute Table
    attr_id
    emp_id
    attr_nam
    attr_value
    1
    1
    dob
    01/01/1990
    2
    1
    city
    ABC
    3
    1
    state
    ZXC
    4
    1
    country
    MMM
    5
    1
    pincode
    12345
    Creating table with large number of columns is bad design as suggested by other Gurus.
    Thanks

  • How to create a table with editable column values.

    Hi everyone,
    I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
    I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
    Thanks in Advance!

    Raghu,
    Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
    Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
    Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
    Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
    Regards,
    Gyan

  • Getting error while creating a table

    Hi there,
    I have created a user 'ram' and gave "create table" permissions for that user.
    After that, when I tried to create a table using the command
    create table countries as select * from hr.countries;
    where hr is another user and countries is the name of table in that schemagetting error message
    ERROR at line 1:
    ORA-00942: table or view does not existNOTE: The same error occurs even while creating a table in 'ram' schema after granting sysdba rights to 'ram'
    Thanks
    Rajiv

    Hi,
    dose the user ram has SELECT rights on the table hr.countries. Can he do SELECT in that table.
    Thanks

  • Error while creating  a PO with Account assignment

    HI MM Gurus
    In our case, we need to create the STO for account assignment cat `Unknown`.
    In SPRO I maintained combination of account assign cat and item cat.
    Now, while creating  a PO with Account assign U we get Error message -  ME069 :Unknown account assignment not defined for use here.
    Please advise how to resolve this issue.

    Hi
    When you are posting actuals, you need to give true account assignment object. With U (unknown), system cannot identify which account to be posted. Change account assignment in PO to another.
    In standard SAP Unknown account assignment is not allowed in PO's. Only exception is Blanket PO.
    Unknown is allowed only in PR and Blanket PO.
    The reason is logically you are releasing the PO to the external vendor or Plant in this case you must know the account assignment.
    Regards,
    Ninad Kshirsagar

  • Error while creating new table

    Hi
    First I had deleted one custom table. Then I try to create the same table with different fields. Now I am gettinh the errors.
    1.    ZLV_COMP_TABLE: Inconsistency DD <-> DB (check table with analysis tool)
    2.   A table called ZLV_COMP_TABLE exists in the database
    3.   No active nametab exists for ZLV_COMP_TABLE
    4.   Termination due to inconsistencies
    5.  Table ZLV_COMP_TABLE (Statements could not be generated)
      6.  Error number in DD_DECIDE (9)
    Please help me ... how can I create a table with same name.
    thanks
    Subhankar

    Hello,
    goto SE14 -- Give the table name
    use Tables Radio button
    click on Edit
    check the Delete Data Radio button
    click on ACTIVATE AND ADJUST DATABASE.
    Now check the table in SE11.
    If it still exits you can change the same table or Delete it again & create a new table with Same Name.
    This might help your query.
    Anil.

  • Error while creating database table

    Hi
    I am creating a table with 2 key fields of length 255 chars each. its giving me error Key field is greater than 780. Please suggest.
    Regards
    Aditya

    Hi,
    Since table key can be max of 255 length,we rarely make use of a single key field of 255,
    so, reduce the length of field.
    Constraints
    All the key fields of a table must be stored together at the beginning of the table. A non-key field may not occur between two key fields.
    A maximum of 16 key fields per table is permitted. The maximum length of the table key is 255.
    If the key length is greater than 120, there are restrictions when transporting table entries. The key can only be specified up to a maximum of 120 places in a transport. If the key is larger than 120, table entries must be transported generically.
    A table may not have more than 249 fields. The sum of all field lengths is limited to 1962 (whereby fields with data type LRAW and LCHR are not counted).
    Fields of types LRAW or LCHR must be at the end of the table. Only one such field is allowed per table. There must also be a field of type INT2 directly in front of such a field. The actual length of the field can be entered there by the database interface.
    Edited by: Sreesudha Gullapalli on Feb 6, 2009 8:19 AM

  • ORA-15180 Error while creating a new DB

    Hi,
    I am creating a Production db for version 11.1.0.7.
    I am getting this error while creating the database:
    ORA-15180: could not open dynamic library odm library0, error [open]
    What steps i need to follow to diagnose this?
    Cheers,
    Kunwar

    15180, 00000, "could not open dynamic library %s, error [%s]"
    // *Cause:  The library was not accessible
    // *Action: Correct the permissions of the library and try again.                                                                                                                                                                                                                                                                                                                                                           

  • I am receiveing error while creating Z table: Entry in table TAORA missing

    Hi Experts,
    I am receiving "Entry in table TAORA missing" while creating Z table.
    Please help
    Edited by: N_niki on Jun 11, 2011 9:22 AM

    Hi
    1) Check for the DB System. The Table name in  "Entry in table TAORA missing", meant to save the "DATA CLASS of the ORACLE application"., OR
    2) check for the Data Class you Selected, on Creation of the Z Table, for which an Entry exists in the TAORA or the Available DATA CLASS in the TAORA Table to fix it.
    Regards
    Gopu

Maybe you are looking for

  • IF-ELSE statement in BI  Query

    Hi guys i have a requirement where in i have condition as mention below... If  say X=0 then Y=0  and     if    X>0  then y=1   where X  is  key figure value...to be compared .. can any one suggest me the logic as to how i need to design this in the q

  • Bridge CS4 desaturating thumbnails

    Approximately 1 second or less after opening Bridge CS4 it slightly desaturates the colours of the thumbnails - this is especially noticeable with greens. When any image is then opened in PsCS4 it contimues to display the desaturated colours. I have

  • Xsql:dml question

    This is what I am trying: <?xml version="1.0"?> <page connection="egemdev" xmlns:xsql="urn:oracle-xsql"> <xsql:dml> begin ord_cancel_pkg.cancel_order('{@order}'); exception when others then raise; end; </xsql:dml> <xsql:query > select order_status ..

  • Soundtrack Pro crashing on launch

    Every time I try and launch Soundtrack Pro it crashes. The details from the error log are as follows: Process: Soundtrack Pro [65073] Path: /Applications/Soundtrack Pro.app/Contents/MacOS/Soundtrack Pro Identifier: com.apple.soundtrackpro Version: ??

  • Pacman download freezes afer a while

    When I try to do a full system upgrade (after three months, by the way), with -Syu, pacman just stops downloading after a short while. Illustration: Total Download Size: 236.85 MB Total Installed Size: 4027.74 MB Proceed with installation? [Y/n] y ::