Problem deleting from table with xmltype column

Hi,
Using a standard, simple screen (generated from JHeadstart), I don't seem to be able to delete from a table including an xmltype column. I have tried it even with a very simple mock table with only one column, an xmltype column, and every time I check the "delete" box and click "save", I get the following error:
oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[33 ].
I have tried this in the JDeveloper application module tester too and the result is the same.
Is it possible to delete a row from a table with an xmltype column? Am I doing something wrong? Is there something special needs done?
As I say, I did this with a one-xmltype-column table using the "Business Components from Tables" wizard, accepting all the defaults.
Thanks,
Darren

In short you want
SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
FROM dab_test;This difference is that for dab_xml, there are no columns defined for the table, therefore you are [OBJECT_VALUE|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a non existent column.
With dab_test, you have a column that contains the XML so you need to use that column name instead of OBJECT_VALUE.

Similar Messages

  • Issue with extractvalue from table with XMLTYPE column.

    I'm sure there is a simple answer but I am having problems
    retrieving data from an xmltype column type.
    I have two tables
    descr dab_xmlName
    TABLE of XMLTYPE
    descr dab_testName
    A NUMBER
    AB NUMBER
    DATA CLOB
    DATA2 VARCHAR2(1600)
    MYXML XMLTYPE
    I have inserted the Oracle example XML purchaseOrder.xml into both dab_xml
    and the myxml column in dab_test.
    When I run the following:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM dab_xml;
    SBELL-2002100912333601PDT is returned
    When I run this:
    SELECT extractvalue(OBJECT_VALUE, '/PurchaseOrder/Reference')
    FROM (select myxml from dab_test);
    ERROR at line 1:
    ORA-00904: "OBJECT_VALUE": invalid identifier
    Why are the two different?
    Any help will be appreciated.
    Regards,
    David

    In short you want
    SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
    FROM dab_test;This difference is that for dab_xml, there are no columns defined for the table, therefore you are [OBJECT_VALUE|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a non existent column.
    With dab_test, you have a column that contains the XML so you need to use that column name instead of OBJECT_VALUE.

  • Find size of table with XMLTYPE column STORE AS BINARY XML

    Hi,
    I have a table with structure as:
    CREATE TABLE XML_TABLE_1
    ID NUMBER NOT NULL,
    SOURCE VARCHAR2(255 CHAR) NOT NULL,
    XML_TEXT SYS.XMLTYPE,
    CREATION_DATE TIMESTAMP(6) NOT NULL
    XMLTYPE XML_TEXT STORE AS BINARY XML (
    TABLESPACE Tablespace1_LOB
    DISABLE STORAGE IN ROW
    CHUNK 16384
    RETENTION
    CACHE READS
    NOLOGGING)
    ALLOW NONSCHEMA
    DISALLOW ANYSCHEMA
    TABLESPACE Tablespace2_DATA
    - So HOW do I find the total size occupied by this table. Does BINARY storage work as LOB storage. i.e. I need to consider USER_LOBS as well for this.
    OR foll. will work
    select segment_name as tablename, sum(bytes/ (1024 * 1024 * 1024 )) as tablesize_in_GB
    From dba_segments
    where segment_name = 'XML_TABLE_1'
    and OWNER = 'SCHEMANAME'
    group by segment_name ;
    - Also if I am copying it to another table of same structure as:
    Insert /*+ append */ into XML_TABLE_2 Select * from XML_TABLE_1.
    Then how much space in ROllbackSegment do I need. Is it equal to the size of the table XML_TABLE_1?
    Thanks..

    I think foll query calculates it right while including the LOB storage as:
    SELECT SUM(bytes)/1024/1024/1024 gb
    FROM dba_segments
    WHERE (owner = 'SCHEMA_NAME' and
    segment_name = 'TABLE_NAME')
    OR (owner, segment_name) IN (
    SELECT owner, segment_name
    FROM dba_lobs
    WHERE owner = 'SCHEMA_NAME'
    AND table_name = 'TABLE_NAME')
    It's 80 GB for our Table with XMLType Column.
    But for the second point:
    Do we need 80GB of UNDO/ROLLBACK Segment for performing:
    Insert /*+ append */ into TableName1 Select * from TableName;
    Thanks..

  • ORA-07445 in the alert log when inserting into table with XMLType column

    I'm trying to insert an xml-document into a table with a schema-based XMLType column. When I try to insert a row (using plsql-developer) - oracle is busy for a few seconds and then the connection to oracle is lost.
    Below you''ll find the following to recreate the problem:
    a) contents from the alert log
    b) create script for the table
    c) the before-insert trigger
    d) the xml-schema
    e) code for registering the schema
    f) the test program
    g) platform information
    Alert Log:
    Fri Aug 17 00:44:11 2007
    Errors in file /oracle/app/oracle/product/10.2.0/db_1/admin/dntspilot2/udump/dntspilot2_ora_13807.trc:
    ORA-07445: exception encountered: core dump [SIGSEGV] [Address not mapped to object] [475177] [] [] []
    Create script for the table:
    CREATE TABLE "DNTSB"."SIGNATURETABLE"
    (     "XML_DOCUMENT" "SYS"."XMLTYPE" ,
    "TS" TIMESTAMP (6) WITH TIME ZONE NOT NULL ENABLE
    ) XMLTYPE COLUMN "XML_DOCUMENT" XMLSCHEMA "http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" ELEMENT "Object"
    ROWDEPENDENCIES ;
    Before-insert trigger:
    create or replace trigger BIS_SIGNATURETABLE
    before insert on signaturetable
    for each row
    declare
    -- local variables here
    l_sigtab_rec signaturetable%rowtype;
    begin
    if (:new.xml_document is not null) then
    :new.xml_document.schemavalidate();
    end if;
    l_sigtab_rec.xml_document := :new.xml_document;
    end BIS_SIGNATURETABLE2;
    XML-Schema (xmldsig-core-schema.xsd):
    =====================================================================================
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Schema for XML Signatures
    http://www.w3.org/2000/09/xmldsig#
    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
    of Technology, Institut National de Recherche en Informatique et en
    Automatique, Keio University). All Rights Reserved.
    http://www.w3.org/Consortium/Legal/
    This document is governed by the W3C Software License [1] as described
    in the FAQ [2].
    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
    -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xdb="http://xmlns.oracle.com/xdb"
    targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified">
    <!-- Basic Types Defined for Signatures -->
    <xs:simpleType name="CryptoBinary">
    <xs:restriction base="xs:base64Binary">
    </xs:restriction>
    </xs:simpleType>
    <!-- Start Signature -->
    <xs:element name="Signature" type="ds:SignatureType"/>
    <xs:complexType name="SignatureType">
    <xs:sequence>
    <xs:element ref="ds:SignedInfo"/>
    <xs:element ref="ds:SignatureValue"/>
    <xs:element ref="ds:KeyInfo" minOccurs="0"/>
    <xs:element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <xs:element name="SignatureValue" type="ds:SignatureValueType"/>
    <xs:complexType name="SignatureValueType">
    <xs:simpleContent>
    <xs:extension base="xs:base64Binary">
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <!-- Start SignedInfo -->
    <xs:element name="SignedInfo" type="ds:SignedInfoType"/>
    <xs:complexType name="SignedInfoType">
    <xs:sequence>
    <xs:element ref="ds:CanonicalizationMethod"/>
    <xs:element ref="ds:SignatureMethod"/>
    <xs:element ref="ds:Reference" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <xs:element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
    <xs:complexType name="CanonicalizationMethodType" mixed="true">
    <xs:sequence>
    <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
    <!-- (0,unbounded) elements from (1,1) namespace -->
    </xs:sequence>
    <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
    </xs:complexType>
    <xs:element name="SignatureMethod" type="ds:SignatureMethodType"/>
    <xs:complexType name="SignatureMethodType" mixed="true">
    <xs:sequence>
    <xs:element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
    <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
    <!-- (0,unbounded) elements from (1,1) external namespace -->
    </xs:sequence>
    <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
    </xs:complexType>
    <!-- Start Reference -->
    <xs:element name="Reference" type="ds:ReferenceType"/>
    <xs:complexType name="ReferenceType">
    <xs:sequence>
    <xs:element ref="ds:Transforms" minOccurs="0"/>
    <xs:element ref="ds:DigestMethod"/>
    <xs:element ref="ds:DigestValue"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    <xs:attribute name="URI" type="xs:anyURI" use="optional"/>
    <xs:attribute name="Type" type="xs:anyURI" use="optional"/>
    </xs:complexType>
    <xs:element name="Transforms" type="ds:TransformsType"/>
    <xs:complexType name="TransformsType">
    <xs:sequence>
    <xs:element ref="ds:Transform" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Transform" type="ds:TransformType"/>
    <xs:complexType name="TransformType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:any namespace="##other" processContents="lax"/>
    <!-- (1,1) elements from (0,unbounded) namespaces -->
    <xs:element name="XPath" type="xs:string"/>
    </xs:choice>
    <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
    </xs:complexType>
    <!-- End Reference -->
    <xs:element name="DigestMethod" type="ds:DigestMethodType"/>
    <xs:complexType name="DigestMethodType" mixed="true">
    <xs:sequence>
    <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
    </xs:complexType>
    <xs:element name="DigestValue" type="ds:DigestValueType"/>
    <xs:simpleType name="DigestValueType">
    <xs:restriction base="xs:base64Binary"/>
    </xs:simpleType>
    <!-- End SignedInfo -->
    <!-- Start KeyInfo -->
    <xs:element name="KeyInfo" type="ds:KeyInfoType"/>
    <xs:complexType name="KeyInfoType" mixed="true">
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="ds:KeyName"/>
    <xs:element ref="ds:KeyValue"/>
    <xs:element ref="ds:RetrievalMethod"/>
    <xs:element ref="ds:X509Data"/>
    <xs:element ref="ds:PGPData"/>
    <xs:element ref="ds:SPKIData"/>
    <xs:element ref="ds:MgmtData"/>
    <xs:any processContents="lax" namespace="##other"/>
    <!-- (1,1) elements from (0,unbounded) namespaces -->
    </xs:choice>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <xs:element name="KeyName" type="xs:string"/>
    <xs:element name="MgmtData" type="xs:string"/>
    <xs:element name="KeyValue" type="ds:KeyValueType"/>
    <xs:complexType name="KeyValueType" mixed="true">
    <xs:choice>
    <xs:element ref="ds:DSAKeyValue"/>
    <xs:element ref="ds:RSAKeyValue"/>
    <xs:any namespace="##other" processContents="lax"/>
    </xs:choice>
    </xs:complexType>
    <xs:element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
    <xs:complexType name="RetrievalMethodType">
    <xs:sequence>
    <xs:element ref="ds:Transforms" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="URI" type="xs:anyURI"/>
    <xs:attribute name="Type" type="xs:anyURI" use="optional"/>
    </xs:complexType>
    <!-- Start X509Data -->
    <xs:element name="X509Data" type="ds:X509DataType"/>
    <xs:complexType name="X509DataType">
    <xs:sequence maxOccurs="unbounded">
    <xs:choice>
    <xs:element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
    <xs:element name="X509SKI" type="xs:base64Binary"/>
    <xs:element name="X509SubjectName" type="xs:string"/>
    <xs:element name="X509Certificate" type="xs:base64Binary"/>
    <xs:element name="X509CRL" type="xs:base64Binary"/>
    <xs:any namespace="##other" processContents="lax"/>
    </xs:choice>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="X509IssuerSerialType">
    <xs:sequence>
    <xs:element name="X509IssuerName" type="xs:string"/>
    <xs:element name="X509SerialNumber" type="xs:integer"/>
    </xs:sequence>
    </xs:complexType>
    <!-- End X509Data -->
    <!-- Begin PGPData -->
    <xs:element name="PGPData" type="ds:PGPDataType"/>
    <xs:complexType name="PGPDataType">
    <xs:choice>
    <xs:sequence>
    <xs:element name="PGPKeyID" type="xs:base64Binary"/>
    <xs:element name="PGPKeyPacket" type="xs:base64Binary" minOccurs="0"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:sequence>
    <xs:element name="PGPKeyPacket" type="xs:base64Binary"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:choice>
    </xs:complexType>
    <!-- End PGPData -->
    <!-- Begin SPKIData -->
    <xs:element name="SPKIData" type="ds:SPKIDataType"/>
    <xs:complexType name="SPKIDataType">
    <xs:sequence maxOccurs="unbounded">
    <xs:element name="SPKISexp" type="xs:base64Binary"/>
    <xs:any namespace="##other" processContents="lax" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <!-- End SPKIData -->
    <!-- End KeyInfo -->
    <!-- Start Object (Manifest, SignatureProperty) -->
    <xs:element name="Object" type="ds:ObjectType"/>
    <xs:complexType name="ObjectType" mixed="true">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:any namespace="##any" processContents="lax"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    <xs:attribute name="MimeType" type="xs:string" use="optional"/> <!-- add a grep facet -->
    <xs:attribute name="Encoding" type="xs:anyURI" use="optional"/>
    </xs:complexType>
    <xs:element name="Manifest" type="ds:ManifestType"/>
    <xs:complexType name="ManifestType">
    <xs:sequence>
    <xs:element ref="ds:Reference" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <xs:element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
    <xs:complexType name="SignaturePropertiesType">
    <xs:sequence>
    <xs:element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <xs:element name="SignatureProperty" type="ds:SignaturePropertyType"/>
    <xs:complexType name="SignaturePropertyType" mixed="true">
    <xs:choice maxOccurs="unbounded">
    <xs:any namespace="##other" processContents="lax"/>
    <!-- (1,1) elements from (1,unbounded) namespaces -->
    </xs:choice>
    <xs:attribute name="Target" type="xs:anyURI" use="required"/>
    <xs:attribute name="Id" type="xs:ID" use="optional"/>
    </xs:complexType>
    <!-- End Object (Manifest, SignatureProperty) -->
    <!-- Start Algorithm Parameters -->
    <xs:simpleType name="HMACOutputLengthType">
    <xs:restriction base="xs:integer"/>
    </xs:simpleType>
    <!-- Start KeyValue Element-types -->
    <xs:element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
    <xs:complexType name="DSAKeyValueType">
    <xs:sequence>
    <xs:sequence minOccurs="0">
    <xs:element name="P" type="ds:CryptoBinary"/>
    <xs:element name="Q" type="ds:CryptoBinary"/>
    </xs:sequence>
    <xs:element name="G" type="ds:CryptoBinary" minOccurs="0"/>
    <xs:element name="Y" type="ds:CryptoBinary"/>
    <xs:element name="J" type="ds:CryptoBinary" minOccurs="0"/>
    <xs:sequence minOccurs="0">
    <xs:element name="Seed" type="ds:CryptoBinary"/>
    <xs:element name="PgenCounter" type="ds:CryptoBinary"/>
    </xs:sequence>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
    <xs:complexType name="RSAKeyValueType">
    <xs:sequence>
    <xs:element name="Modulus" type="ds:CryptoBinary"/>
    <xs:element name="Exponent" type="ds:CryptoBinary"/>
    </xs:sequence>
    </xs:complexType>
    <!-- End KeyValue Element-types -->
    <!-- End Signature -->
    </xs:schema>
    ===============================================================================
    Code for registering the xml-schema
    begin
    dbms_xmlschema.deleteSchema('http://xmlns.oracle.com/xdb/schemas/DNTSB/www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
    dbms_xmlschema.DELETE_CASCADE_FORCE);
    end;
    begin
    DBMS_XMLSCHEMA.REGISTERURI(
    schemaurl => 'http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
    schemadocuri => 'http://www.sporfori.fo/schemas/www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd',
    local => TRUE,
    gentypes => TRUE,
    genbean => FALSE,
    gentables => TRUE,
    force => FALSE,
    owner => 'DNTSB',
    options => 0);
    end;
    Test program
    -- Created on 17-07-2006 by EEJ
    declare
    XML_TEXT3 CLOB := '<Object xmlns="http://www.w3.org/2000/09/xmldsig#">
                                  <SignatureProperties>
                                       <SignatureProperty Target="">
                                            <Timestamp xmlns="http://www.sporfori.fo/schemas/dnts/general/2006/11/14">2007-05-10T12:00:00-05:00</Timestamp>
                                       </SignatureProperty>
                                  </SignatureProperties>
                             </Object>';
    xmldoc xmltype;
    begin
    xmldoc := xmltype(xml_text3);
    insert into signaturetable
    (xml_document, ts)
    values
    (xmldoc, current_timestamp);
    end;
    Platform information
    Operating system:
    -bash-3.00$ uname -a
    SunOS dntsdb 5.10 Generic_125101-09 i86pc i386 i86pc
    SQLPlus:
    SQL*Plus: Release 10.2.0.3.0 - Production on Fri Aug 17 00:15:13 2007
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning and Data Mining options
    Kind Regards,
    Eyðun

    You should report this in a service request on http://metalink.oracle.com.
    It is a shame that you put all the effort here to describe your problem, but on the other hand you can now also copy & paste the question to Oracle Support.
    Because you are using 10.2.0.3; I am guessing that you have a valid service contract...

  • Issues with using XMLType indexes against a table with XMLType column

    I am attempting to use an XMLIndex with a Structured Component and not having too much luck. Not much data in metalink nor is the documentation very helpful:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb_indexing.htm#BCGHGIGC
    The table DDL is as follows:
    CREATE TABLE ECI_SCHEMA.REV_ITEM_EARN_DTL_VIRTUAL(
    REV_ITEM_EARN_DTL_ID_NBR NUMBER(16,0) NOT NULL,
    UNIQ_MSG_ID_NBR VARCHAR2(50) NOT NULL,
    REV_ITEM_BILL_DTL_ID_NBR NUMBER(16,0),
    PLAN_RACN_NBR NUMBER(10,0) NOT NULL,
    INV_DTL_IMG SYS.XMLType NOT NULL,
    NON_INV_DTL_IMG BLOB NOT NULL,
    PART_KEY_CD GENERATED ALWAYS AS (MOD(PLAN_RACN_NBR,5)) VIRTUAL,
    LAST_UPDT_TMSTP TIMESTAMP(6) NOT NULL,
    INV_ID_NBR NUMBER(16,0),
    ITEM_STATUS_CD VARCHAR2(1) DEFAULT 'A' NOT NULL
    LOB (NON_INV_DTL_IMG) STORE AS NON_IDI_LOB (CHUNK 8192 PCTVERSION 10 CACHE)
    TABLESPACE ECI_DATA
    PARTITION BY RANGE (PART_KEY_CD)
    PARTITION RIED_DAY0_PART
    VALUES LESS THAN (1)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY1_PART
    VALUES LESS THAN (2)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY2_PART
    VALUES LESS THAN (3)
    TABLESPACE ECI_DATA
    PARTITION RIED_DAY3_PART
    VALUES LESS THAN (4)
    TABLESPACE ECI_DATA
    PARTITION RIED_MAXVAL_PART
    VALUES LESS THAN (MAXVALUE)
    TABLESPACE ECI_DATA
    XMLTYPE COLUMN "INV_DTL_IMG" STORE AS OBJECT RELATIONAL
    XMLSCHEMA "someXdbDocument.xsd"
    ELEMENT "revenueInvoice"
    According to the documentation, I should be able to create a structured XMLIndex on the XMLType column with the following syntax:
    SQL> create index eci_schema.rev_item_earn_dtl_virt_xmlix on eci_schema.rev_item_earn_dtl_virtual
    2 (INV_DTL_IMG)
    3 INDEXTYPE IS XDB.XMLIndex
    4 parameters ('PATH TABLE RIED_PATH_TABLE')
    5 local;
    When I do this, I get the following error:
    create index eci_schema.rev_item_earn_dtl_virt_xmlix on eci_schema.rev_item_earn_dtl_virtual
    ERROR at line 1:
    ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
    ORA-30959: The indexed column is not stored in CLOB.
    What am I doing wrong? Based on the Oracle documentation, I was under the impression that 11.2 XMLIndex would work with Object Relational storage. Is this not the case?

    CREATE INDEX ECI_SCHEMA.REV_ITEM_EARN_DTL_IX7
           ON ECI_SCHEMA.REV_ITEM_EARN_DTL
                      extractValue(inv_dtl_img, '/revenueInvoice/service/transportation/mstrTrkngNbr')
    TABLESPACE ECI_REV_ITEM_EARN_DTL_IX7_ITS
    LOGGING
    PARALLEL(DEGREE 8 INSTANCES 1)
    LOCAL
    /Elements that occur at most once in each document can be indexed using extractValue(). Despite the fact that the index appears to be a functional index, when we create the index we automatically re-write the create index into a normal btree index on the column that contains the value for the element identified by the xpath.
    Eg in the case of a functional index based on extractValue, defined on XMLType using Object relational storage, with an xpath that identifies a node that occurs at most once in each document is not a functional index, it's re-written into a plain old vanilla btree index. You can actually check this by looking in the system tables
    Eg
    SQL> connect system/oracle
    Connected.
    SQL> select table_name, index_name from all_indexes where owner = 'OE' and table_name = 'PURCHASEORDER';
    TABLE_NAME                     INDEX_NAME
    PURCHASEORDER                  LINEITEM_TABLE_MEMBERS
    PURCHASEORDER                  ACTION_TABLE_MEMBERS
    PURCHASEORDER                  SYS_C0011037
    SQL> alter session set current_schema = OE
      2  /
    Session altered.
    SQL> create unique index PO_REF_INDEX on PURCHASEORDER (extractValue(object_value,'/PurchaseOrder/Reference'));
    Index created.
    SQL> set lines 250
    SQL> select index_name, index_type from all_indexes where owner = 'OE' and table_name = 'PURCHASEORDER';
    INDEX_NAME                     INDEX_TYPE
    PO_REF_INDEX                   NORMAL
    LINEITEM_TABLE_MEMBERS         NORMAL
    ACTION_TABLE_MEMBERS           NORMAL
    SYS_C0011037                   NORMAL
    SQL> select * from dba_ind_expressions where table_name = 'PURCHASEORDER' and index_owner = 'OE'
      2  /
    no rows selectedFrom the above we can see that the index created on extractValue has been re-written in a plain old vanilla BTREE index, and there is no definition for it in dba_ind_expressions So assuming you were able to create the index and insert the data you should find that your index is not a functional index.
    ]

  • Help on how to query 11g table with XMLType column

    To all,
    We have this table:
    DESC MESSAGE
    Name Null Type
    MESSAGE_ID NOT NULL NUMBER(38)
    REQUEST_UU_ID NOT NULL VARCHAR2(50)
    MESSAGE_TYPE_CD NOT NULL CHAR(3 CHAR)
    EMPLOYEE_NUM NOT NULL VARCHAR2(8)
    SEQUENCE_NUM VARCHAR2(20)
    REVERSAL_SEQUENCE_NUM VARCHAR2(20)
    TRANSACTION_TS TIMESTAMP(6)
    MESSAGE_CONTENT_TXT NOT NULL XMLTYPE()
    CREATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    CREATE_BY_TS NOT NULL TIMESTAMP(6)
    LAST_UPDATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    LAST_UPDATE_BY_TS NOT NULL TIMESTAMP(6)
    Given we have multiple columns and one is XMLType how do I query to find rows in the db that match this XPath
    Here is a fragment of XML that is held in MESSAGE_CONTENT_TXT XMLType column:
    <?xml version="1.0" encoding="UTF-8"?>
    <cfg-env:Envelope xmlns="http://www.co.com/schemas/CFX/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.co.com/schemas/cfg-env/" >
         <cfg-env:Header>
              <cfg-hdr:MessageHeader xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns="http://www.co.com/schemas/CFX/">
                   <cfg-hdr:Service>
                        <cfg-hdr:ServiceName>process</cfg-hdr:ServiceName>
                        <cfg-hdr:MessageType>Request</cfg-hdr:MessageType>
                        <cfg-hdr:ServiceVersion>1</cfg-hdr:ServiceVersion>
                   </cfg-hdr:Service>
                   <cfg-hdr:From>
                        <cfg-hdr:PartyId>13-175-8724</cfg-hdr:PartyId>
                        <cfg-hdr:CostCenter>2009065</cfg-hdr:CostCenter>
                        <cfg-hdr:System>
                             <cfg-hdr:Application>[email protected]</cfg-hdr:Application>
                             <cfg-hdr:Version>1.0</cfg-hdr:Version>
                             <cfg-hdr:Channel>TLR</cfg-hdr:Channel>
                        </cfg-hdr:System>
                        <cfg-hdr:OrigReplyToQMgr>QMBKRD01</cfg-hdr:OrigReplyToQMgr>
                        <cfg-hdr:OrigReplyToQ>Q1</cfg-hdr:OrigReplyToQ>
                   </cfg-hdr:From>
                   <cfg-hdr:UserSession>
                        <cfg-hdr:SignonRole>User</cfg-hdr:SignonRole>
                        <cfg-hdr:LogonId>R099999</cfg-hdr:LogonId>
    I'm trying to find rows in the database that are /Envelope/Header/MessageHeader/UserSession/LogonId/R099999.
    Thanks for the assistance. I'm new to XML DB. I appreciate the help.
    Eric

    Hi Eric,
    You can use XMLExists, like this :
    select *
    from message t
    where xmlexists(
          'declare namespace env = "http://www.co.com/schemas/cfg-env/"; (: :)
           declare namespace hdr = "http://www.co.com/schemas/cfg-hdr/"; (: :)
           /env:Envelope/env:Header/hdr:MessageHeader/hdr:UserSession[hdr:LogonId=$id]'
           passing t.message_content_txt
                 , 'R099999' as "id"
    );

  • Export data from table with CLOB column

    DB: Oracle10g
    SQLDeveloper: 1.0
    OS: windows xp for sqldeveloper
    Linux for Oracle db
    we have a table with two CLOB columns. We want to export the data to either text or csv. But the CLOB columns don't show up in the columns that can be exported.
    How do I export CLOB data from SQL Developer?
    Regards,
    Lonneke

    I don't think this is a good protection: you can have these characters in VARCHAR anyway, and this way you "throw the baby out with the bath water". Not mentioning that right now also immune formats like HTML are also limited.

  • ORA-00904 on create table with xmltype column

    Hi,
    I am trying to create a table with syntax
    CREATE TABLE ss_test(docid integer primary key, content varchar2(4000),acl XMLType)
    XMLType column acl store as object relational
    XMLSchema "acl.xsd" element "acl"
    varray xmldata."ace" store as table ace_tab;
    and getting ORA-00904.
    acl.xsd is registered as
    begin
    dbms_xmlschema.registerschema('acl.xsd',
    ' <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xdb="http://xmlns.oracle.com/xdb">
    <xs:element name="acl" xdb:SQLType="ACL_TYPE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ace" maxOccurs="100">
    <xs:complexType>
    <xs:attribute name="id" type="xs:integer"/>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>',true,true,false,false);
    end;
    Couldnt figure out whats wrong with the syntax. Any pointers ?
    Thanks,
    Rakesh

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • NullPointerException when deleting from table with no non-primary keys

    We have an object mapped to a table in our database.
    This table has two fields that together form a composite key. When we attempt to perform a delete from this table using the mapped object we receive the following exception and stack trace:
    java.lang.NullPointerException
    at oracle.toplink.descriptors.FieldsLockingPolicy.getAllNonPrimaryKeyFields(Unknown Source)
    at oracle.toplink.descriptors.AllFieldsLockingPolicy.getFieldsToCompare(Unknown Source)
    at oracle.toplink.descriptors.FieldsLockingPolicy.buildExpression(Unknown Source)
    at oracle.toplink.descriptors.FieldsLockingPolicy.buildDeleteExpression(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildDeleteExpression(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.buildDeleteStatement(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.prepareDeleteObject(Unknown Source)
    at oracle.toplink.internal.queryframework.StatementQueryMechanism.deleteObject(Unknown Source)
    at oracle.toplink.queryframework.DeleteObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
    at oracle.toplink.tools.profiler.PerformanceProfiler.profileExecutionOfQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.sessions.CommitManager.deleteAllObjects(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(Unknown Source)
    at oracle.toplink.publicinterface.UnitOfWork.commit(Unknown Source)
    <snip remainder of stack trace>
    The table definition for our table is as follows:
    PK,FK TASK_ID NUMBER NOT NULL
    PK,FK USER_ID NUMBER NOT NULL
    Each field is a foreign key to another table, however this is not a join table for a many to many relationship.
    The mapping definition for the mapped object is as follows:
    public Descriptor buildProConSubscriptionDescriptor( )
    Descriptor descriptor = new Descriptor( );
    descriptor.setJavaClass( mil.usmc.mol.procon.domain.ProConSubscription.class );
    descriptor.addTableName( "PRO_CON_SUBSCRIPTION" );
    descriptor.addPrimaryKeyFieldName( "PRO_CON_SUBSCRIPTION.TASK_ID" );
    descriptor.addPrimaryKeyFieldName( "PRO_CON_SUBSCRIPTION.USER_ID" );
    // Descriptor properties.
    descriptor.useNoIdentityMap( );
    descriptor.setIdentityMapSize( 1000 );
    descriptor.useRemoteNoIdentityMap( );
    descriptor.setRemoteIdentityMapSize( 1000 );
    descriptor.setAlias( "ProConSubscription" );
    descriptor.useAllFieldsLocking( );
    // Query manager.
    descriptor.getQueryManager( ).checkDatabaseForDoesExist( );
    //Named Queries
    // Event manager.
    // Mappings.
    DirectToFieldMapping taskIdMapping = new DirectToFieldMapping( );
    taskIdMapping.setAttributeName( "taskId" );
    taskIdMapping.setGetMethodName( "getTaskId" );
    taskIdMapping.setSetMethodName( "setTaskId" );
    taskIdMapping.setFieldName( "PRO_CON_SUBSCRIPTION.TASK_ID" );
    descriptor.addMapping( taskIdMapping );
    DirectToFieldMapping userIdMapping = new DirectToFieldMapping( );
    userIdMapping.setAttributeName( "userId" );
    userIdMapping.setGetMethodName( "getUserId" );
    userIdMapping.setSetMethodName( "setUserId" );
    userIdMapping.setFieldName( "PRO_CON_SUBSCRIPTION.USER_ID" );
    descriptor.addMapping( userIdMapping );
    return descriptor;
    Any thoughts as to why this is happening?
    Thanks,
    Andrew Lee

    Hi Andrew,
    AllFieldsLocking isn't designed for this since you have an object that's composed entirely of primary data. You should make use of any other of TopLink's locking policies to make this work. For instance, try useChangedFieldsLocking(), pessimistic or any of the optimistic locking strategies available from within TopLink for this to work based on the design you have outlined.
    Darren

  • Replication on the table with XMLType column and schema registered

    Dear All,
    Does Oracle XML DB 11g support replication for tables with schema registered?
    Is there any recommended approach?
    Thanks and regards,
    Swapnil

    Hmmmm ... I don't know if I should smile or frown with the implication that I am an OO guy :D :D
    Most of my colleagues when I started working as a software engineer, treated me as too low-level because of my C background (started doing C in 1985).
    In my last job, my colleagues hated my guts because I was asking them to squeeze every bit of performance out of C++ by using STL which is definitely not OO (although C++ is).
    My current colleagues treat me as a DB guru (which I most definitely am not) and they overlook/forget the fact that most of them use Java libraries in their projects, that I wrote for them !
    I am inclined to believe that I do not fall into any category in the end...
    The only thing I am for sure - and I am proud of it - is inquisitive. I want to know everything there is about the tools I use, and so I end up spending hours and hours investigating... (Microsoft found that out the hard way when I filed 16 bug reports in 8 days when Visual C++ 6 came out ! Not that it hurt them though...)
    This is where my confession ends (and my working on the XML validator starts...)
    Καληνύχτα Marco
    Philip (Φίλιππος in Greek)
    PS: I did not follow the last solution anyway. I just wanted to verify its operability ;)

  • 4.0 EA1 - Cannot select from table with xmltype

    Hi,
    I have the following table. When doing a select * from horus_owner.horus_objects nothing is shown. This could be reproduced with both 10g and 11g on the database-side.
    Regards,
    Johannes
    -- Wiedergabe von TABLE DDL für Objekt HORUS_OWNER.HORUS_OBJECTS nicht möglich, da DBMS_METADATA internen Generator versucht.
    CREATE TABLE HORUS_OWNER.HORUS_OBJECTS
      ID NUMBER(32, 0) NOT NULL
    , TRE_ID NUMBER(32, 0) NOT NULL
    , WRK_ID NUMBER(32, 0) NOT NULL
    , NAME VARCHAR2(200 BYTE) NOT NULL
    , MOD_TYPE VARCHAR2(10 BYTE) NOT NULL
    , LOCKED_BY VARCHAR2(30 BYTE)
    , PETRI_XML SYS.XMLTYPE
    , AOM_XML SYS.XMLTYPE
    , SHM_XML SYS.XMLTYPE
    , ORG_XML SYS.XMLTYPE
    , ROLE_XML SYS.XMLTYPE
    , MIT_XML SYS.XMLTYPE
    , RUL_XML SYS.XMLTYPE
    , TXT_DATA CLOB
    , CREATED DATE NOT NULL
    , CREATED_BY VARCHAR2(30 BYTE) NOT NULL
    , UPDATED_BY VARCHAR2(30 BYTE)
    , UPDATED DATE
    , SIM_XML SYS.XMLTYPE
    , GLOSSARY_XML SYS.XMLTYPE
    , CONSTRAINT OBJ_PK PRIMARY KEY
        ID
      ENABLE
    LOGGING
    TABLESPACE HORUS_OWNER_DATA
    PCTFREE 10
    INITRANS 1
    STORAGE
      INITIAL 65536
      NEXT 1048576
      MINEXTENTS 1
      MAXEXTENTS UNLIMITED
      BUFFER_POOL DEFAULT
    ) NOCOMPRESS
    XMLTYPE PETRI_XML STORE AS CLOB
    XMLTYPE AOM_XML STORE AS CLOB
    XMLTYPE SHM_XML STORE AS CLOB
    XMLTYPE ORG_XML STORE AS CLOB
    XMLTYPE ROLE_XML STORE AS CLOB
    XMLTYPE MIT_XML STORE AS CLOB
    XMLTYPE RUL_XML STORE AS CLOB
    LOB (TXT_DATA) STORE AS SYS_LOB0000024538C00021$$
      ENABLE STORAGE IN ROW
      CHUNK 8192
      RETENTION
      NOCACHE
      LOGGING 
    XMLTYPE SIM_XML STORE AS CLOB
    XMLTYPE GLOSSARY_XML STORE AS CLOBALTER TABLE HORUS_OWNER.HORUS_OBJECTS
    ADD CONSTRAINT OBJ_UK UNIQUE
      WRK_ID
    , NAME
    , TRE_ID
    ENABLEALTER TABLE HORUS_OWNER.HORUS_OBJECTS
    ADD CONSTRAINT OBJ_TRE_FK FOREIGN KEY
      TRE_ID
    REFERENCES HORUS_OWNER.HORUS_TREE_NODES
      ID
    ENABLEALTER TABLE HORUS_OWNER.HORUS_OBJECTS
    ADD CONSTRAINT AVCON_1243352806_MOD_T_000 CHECK
    (MOD_TYPE
    IN ('EMP', 'ROL', 'ENT', 'OCH', 'XML', 'SHM', 'OSM', 'BUM', 'BOM',
    'BEH', 'KPI', 'RIS', 'SER', 'STR', 'SWO', 'AOM', 'CON', 'GOA', 'BUR'
    , 'BPA', 'RES', 'SIM', 'GLO','TEM', 'SAR'))
    ENABLECREATE UNIQUE INDEX HORUS_OWNER.OBJ_PK ON HORUS_OWNER.HORUS_OBJECTS (ID ASC)
    LOGGING
    TABLESPACE HORUS_OWNER_IDX
    PCTFREE 10
    INITRANS 2
    STORAGE
      INITIAL 65536
      NEXT 1048576
      MINEXTENTS 1
      MAXEXTENTS UNLIMITED
      BUFFER_POOL DEFAULT
    NOPARALLEL
    CREATE INDEX HORUS_OWNER.OBJ_TRE_FK_I ON HORUS_OWNER.HORUS_OBJECTS (TRE_ID ASC)
    LOGGING
    TABLESPACE HORUS_OWNER_IDX
    PCTFREE 10
    INITRANS 2
    STORAGE
      INITIAL 65536
      NEXT 1048576
      MINEXTENTS 1
      MAXEXTENTS UNLIMITED
      BUFFER_POOL DEFAULT
    NOPARALLEL
    CREATE UNIQUE INDEX HORUS_OWNER.OBJ_UK ON HORUS_OWNER.HORUS_OBJECTS (WRK_ID ASC, NAME ASC, TRE_ID ASC)
    LOGGING
    TABLESPACE HORUS_OWNER_IDX
    PCTFREE 10
    INITRANS 2
    STORAGE
      INITIAL 65536
      NEXT 1048576
      MINEXTENTS 1
      MAXEXTENTS UNLIMITED
      BUFFER_POOL DEFAULT
    NOPARALLEL
    CREATE INDEX HORUS_OWNER.OBJ_WRK_FK_I ON HORUS_OWNER.HORUS_OBJECTS (WRK_ID ASC)
    LOGGING
    TABLESPACE HORUS_OWNER_IDX
    PCTFREE 10
    INITRANS 2
    STORAGE
      INITIAL 65536
      NEXT 1048576
      MINEXTENTS 1
      MAXEXTENTS UNLIMITED
      BUFFER_POOL DEFAULT
    NOPARALLEL

    Not sure if this helps, but I was trying to come up with some test cases myself and I noticed some strange behavior.  4 simple test cases:
    SELECT XMLTYPE('<OUTER><INNER>TEST</INNER></OUTER>') FROM DUAL;
    SELECT XMLELEMENT("OUTER", XMLELEMENT("INNER", 'TEST')) FROM DUAL;
    SELECT XMLELEMENT("OUTER", XMLAGG(XMLFOREST('TEST' "INNER"))) FROM DUAL;
    SELECT XMLQUERY('/OUTER' PASSING XMLTYPE('<OUTER><INNER>TEST</INNER></OUTER>') RETURNING CONTENT) FROM DUAL;
    1 and 2 return the xml string in the result grid column.  3 and 4 return (XMLTYPE) with no data in the pop-up editor when double clicking the result.  I changed #3 to:
    SELECT XMLELEMENT("OUTER", XMLFOREST('TEST' "INNER")) FROM DUAL;
    and it returns the XML string.
    I used undo to revert back to my original #3 and it started showing the XML string instead of (XMLTYPE) previously observed.
    I changed my connection to another schema, ran #3 again, and it went back to (XMLTYPE).  I tried to recreate the same behavior using the 2nd schema, but I was unable to get to show the XML string. 
    In any test case where I was getting the (XMLTYPE), I was not able to see data in the pop-up editor.
    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 HPUX: Version 11.2.0.3.0 - Production                                   
    NLSRTL Version 11.2.0.3.0 - Production 

  • 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.

  • OO4O, OCI-21560 when selecting records with XMLTYPE column

    When I try to select records from a table with XMLTYPE column
    Set sqldynaset = oraDatabase.dbcreatedynaset("select * from tab1",
    ORADYN_READONLY)
    I got the error message:
    OCI-21560: argument 3 is null, invalid, or out of range.
    Please help.
    Development Tool: VB6
    Oracle Client Version (OIP) : 9.2.0.4.4
    Platform: Window XP

    OO4O doesn' t understand XMLType.

  • Import is very Slow with xmltype column in oracle 9.2.0.7

    Hi
    We are using oracle 9.2.0.7 on Solaris
    The import without XMLTYPE column is faster the import of the table with XMLTYPE column.Also when we do the export in direct path it is still going for Conventional(I suppose this is correct for XMLTYPE).
    Is this the general behaviour of XMLTYPE...if so how to improve the performance of the import.
    Can anybody help us out in resolving the issue.

    here is the output
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    CREATE TABLE "MMSCBMC"."PAYMENTS_AUDIT"
    ( "PMTID" NUMBER NOT NULL ENABLE,
    "PMTSTATUS" VARCHAR2(32) NOT NULL ENABLE,
    "PMTSTATUS_CODE" VARCHAR2(10) NOT NULL ENABLE,
    "CSREFID" VARCHAR2(32),
    "CURAMT" NUMBER(15,2) NOT NULL ENABLE,
    "CUSTOMER_KEY" NUMBER NOT NULL ENABLE,
    "ACCTID" VARCHAR2(32) NOT NULL ENABLE,
    "BANKREFID" VARCHAR2(34) NOT NULL ENABLE,
    "PAYEEID" NUMBER,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "PAYMENTS_AUDIT_KEY" NUMBER NOT NULL ENABLE,
    "PROCDATE" DATE NOT NULL ENABLE,
    "DUEDATE" DATE NOT NULL ENABLE,
    "IMMEDIATE_GENERATION" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "RECURRINGPMTID" NUMBER,
    "BATCHID" NUMBER,
    "REMIT_INFO" VARCHAR2(200),
    "BILLING_ACCT" VARCHAR2(32),
    "PAYMENT_METHOD" VARCHAR2(20) NOT NULL ENABLE,
    "IS_ACCTNUMBER" NUMBER,
    "SPREFID" VARCHAR2(36),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FIDEBITTRCNUM" VARCHAR2(32),
    "FEE" NUMBER(12,2),
    "FEE_TYPE" VARCHAR2(10) DEFAULT NULL ,
    "DATE_ADDED" DATE NOT NULL ENABLE,
    "CLIENTIP" VARCHAR2(32) NOT NULL ENABLE,
    "LAST_UPDATED" DATE NOT NULL ENABLE,
    "ACTION" VARCHAR2(32),
    "MODIFIEDBY" VARCHAR2(32) NOT NULL ENABLE,
    "ISCSR" VARCHAR2(1) NOT NULL ENABLE,
    "SUBUSER_KEY" NUMBER,
    "TOKEN" NUMBER DEFAULT 0 NOT NULL ENABLE,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FUNDINGSTATUS_CODE" NUMBER DEFAULT 0 NOT NULL ENABLE,
    "FUNDINGSTATUS" VARCHAR2(32) DEFAULT 'Funds Pending' NOT NULL ENABLE,
    "PRODUCT_CODE" VARCHAR2(10),
    "SUB_PRODUCT_CODE" VARCHAR2(10),
    "ACCT_TYPE" VARCHAR2(3),
    "DEST_PRODUCT_CODE" VARCHAR2(10),
    "DEST_SUB_PRODUCT_CODE" VARCHAR2(10),
    "DEST_BANKREFID" VARCHAR2(34),
    "DEST_ACCT_TYPE" VARCHAR2(3),
    "ISDEBIT" NUMBER NOT NULL ENABLE,
    "PAYMENTFROM_NICKNAME" VARCHAR2(96),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "PAYMENTFROM_ACCTID" VARCHAR2(32),
    "PAYMENTTO_NICKNAME" VARCHAR2(96),
    "PAYMENTTO_ACCTID" VARCHAR2(32),
    "DEST_ISBUSINESSACCT" NUMBER,
    "APPROVE_DATE" DATE,
    "APPROVE_KEY" NUMBER,
    "LAST_MODIFIER_KEY" NUMBER,
    "CHECK_DESC" VARCHAR2(200),
    "FAILURE_REASON" VARCHAR2(250),
    "PMTFUNDRETRY_COUNT" NUMBER DEFAULT 0 ,
    "MQ_TRANSACTIONID" NUMBER,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    "FREQUENCY" NUMBER,
    "NUMBEROFREMPAYMENTS" NUMBER,
    "OPENENDED" NUMBER,
    "ORIGINATOR_KEY" NUMBER NOT NULL ENABLE,
    "EXTERNALREFERENCE" "SYS"."XMLTYPE" ,
    "EXTERNALINFO" "SYS"."XMLTYPE" ,
    "PRINCIPAL_AMT" NUMBER(15,2),
    "ESCROW_AMT" NUMBER(15,2),
    "LATEFEE_AMT" NUMBER(15,2),
    "OTHERFEE_AMT" NUMBER(15,2),
    "REGULARPMT_AMT" NUMBER(15,2),
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    CONSTRAINT "PK_PAYMENTSADT_KEY" PRIMARY KEY ("LAST_UPDATED", "PAYMENTS_AUDIT_K
    EY")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "MMS_DATA_TBS" ENABLE,
    CONSTRAINT "FK01_PAYMENTS_AUDIT" FOREIGN KEY ("APPROVE_KEY")
    REFERENCES "MMSCBMC"."CUSTOMER" ("CUSTOMER_KEY") ENABLE,
    CONSTRAINT "FK02_PAYMENTS_AUDIT" FOREIGN KEY ("LAST_MODIFIER_KEY")
    REFERENCES "MMSCBMC"."CUSTOMER" ("CUSTOMER_KEY") ENABLE,
    CONSTRAINT "FK06_PAYMENTS_AUDIT" FOREIGN KEY ("ORIGINATOR_KEY")
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    REFERENCES "MMSCBMC"."ORIGINATOR" ("ORIGINATOR_KEY") ENABLE
    ) PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOGGING
    STORAGE(
    BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    PARTITION BY RANGE ("LAST_UPDATED")
    (PARTITION "M1_2005" VALUES LESS THAN (TO_DATE(' 2005-02-01 00:00:00', 'SYYYY-
    MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS ,
    PARTITION "M2_2005" VALUES LESS THAN (TO_DATE(' 2005-03-01 00:00:00', 'SYYYY-M
    M-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS ,
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    PARTITION "MAX_VALUE" VALUES LESS THAN (MAXVALUE)
    PCTFREE 2 PCTUSED 40 INITRANS 1 MAXTRANS 255
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS"
    LOB ("SYS_NC00059$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    DBMS_METADATA.GET_DDL('TABLE','PAYMENTS_AUDIT')
    LOB ("SYS_NC00061$") STORE AS (
    TABLESPACE "PAYMENTS_AUDIT_DATA_TBS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSI
    ON 10
    NOCACHE
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) NOCOMPRESS )

  • How to read/write a binary file from/to a table with BLOB column

    I have create a table with a column of data type BLOB.
    I can read/write an IMAGE file from/to the column of the table using:
    READ_IMAGE_FILE
    WRITE_IMAGE_FILE
    How can I do the same for other binary files, e.g. aaaa.zip?

    There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
    To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275

Maybe you are looking for

  • Saving the output from a JSP request

    I have developed a decision support web site that amongst other things generates a "report" page. Now my client would like to add the ability for users of the site to have that report emailed out to them. Sending the email obviously isn't a problem,

  • Not showing in itunes

    I have iTunes 10 on Mac OS 10.6. My iphone isn't showing up in iTunes. Help!

  • Exchange Server 2013 - Unattended mode recoverserver fails

    Re-installing CAS server. This is something I have done before without issue. In order to properly upgrade from Server 2012 to 2012 R2, I have actually deleted the VDisk, created a blank. Installed server 2012 R2, ran prerequisites and hit the Exchan

  • Can I import photos from an old iPhoto library?

    Can I import photos from an old iPhoto library on an external hard drive to my current iPhoto library?  The icon on the hard drive appears greyed out when I try via Import.

  • Flash acvitation in internet explorer

    hello all, i am having abit of trouble with flash at the moment, i have noticed with internet explorer i have to click my flash .swf's first before i can use them to activate them, and i was wondering if there is any way of getting rid of this as i a