Saving xmltype columns to file system

I want to output the values of an XMLTYPE column in one of our tables into a separate file for each record.
I'm trying to get UTL_FILE to write the data and am having issues. I have found many examples of how to do this in 10, but I'm on 9i. Anyone have any sample code around that will allow me to do this?
_mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Yes It works...

Similar Messages

  • XML Schema based XMLType column leaves file open on error

    Hello,
    I have the following situation on both oracle 10.1.0.2.0 and 10.1.0.4.0:
    insert into xml_products (xmlfile) values(bfilename(file_loc, char_id));
    "xmlfile" is a xmltype column based on a registered xml schema.
    When the file fails xml schema validation, the file remains open and I cannot move it until i close the session.
    Is this a bug or an "intentional feature"?
    Any workarounds?
    Thanks,
    Flavio

    All right Mark,
    thanks for your reply.
    Meanwhile I fixed the problem and posted my workaround here:
    http://oraclequirks.blogspot.com/2005/11/ora-29292-and-xmltype.html
    Bye,
    Flavio

  • Data download in file system

    Hello everybody!
    is there a simple possibility to download the whole data from e.g. table MARA in background in the SAP file system with SAP standard applications?
    The requirement of our customer is that every evening should a job start which collects the whole data from various tables like MARA or VBAK etc. and write them in CSV-files which should be saved in the SAP file system.
    Of course it's possible to write a simple report which could do this but I wonder if there is any SAP standard application which could do this???
    Thanks for any helpful answers!!!
    Christian

    Hi Christian,
    If you look at the Quickview in Basis mode, there are some output options under "Export as". One of these may help.
    When you run the quickview the selection screen should give you a range of output options - I had hoped that you might be able to choose to write to a SAP file from there, although I think it may be limited to local (PC) files only, which I don't think is what you want.
    As an alternative, how about looking at the database backup utilities?
    I would think your basis people should be able to help you set up a single-table backup. Would that satisfy the requirement?
    Hope this is some help to you,
    Best Regards
    Robin

  • LPX-00004 - Problems while inserting xml files in a xmltype column

    I've faced two problems while trying to insert xml files into my table containing a xmltype column:
    create table xml_test (id number(20),content xmltype)
    I use following java code for writing xml docs into db:
         conn.setAutoCommit(false);
         OraclePreparedStatement stmt = (OraclePreparedStatement)
              conn.prepareStatement("INSERT INTO xml_test (id,content) VALUES(?,?)");
         File file = new File(file1);
         InputStream in1 = new FileInputStream(file1);
         Reader r1 = new BufferedReader(new InputStreamReader(in1, "UTF-8"));
         int len = 0;
         StringBuffer text = new StringBuffer();
         while ((len = r1.read()) != -1) {
              text.append((char) len);
         in1.close();
         r1.close();
         XMLType poXML1 = XMLType.createXML(conn, text.toString());
         for (int i = 1; i <= 1; i++) {
              stmt.setInt(1, i);
              stmt.setObject(2, poXML1);
              stmt.execute();
         conn.commit();
    1. problem: occures only if a xml schema has been assoicated to the specific xmltype column. it seems that the length of a specific xml tag in the document is limited. but why?
    java.sql.SQLException: ORA-22814: attribute or element value is larger than specified in type
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at test.insertXML(test.java:84)
         at test.main(test.java:261)
    hier the xml-schema of the xmltype column "content":
    <?xml version="1.0" encoding="UTF-8"?>
    <!--W3C Schema generated by XML Spy v4.4 U (http://www.xmlspy.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="AUTOR-ID" type="xs:string"/>
         <xs:element name="BODY" type="xs:string"/>
         <xs:element name="CONTENT">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="METADATEN"/>
                        <xs:element ref="BODY"/>
                   </xs:sequence>
                   <xs:attribute name="content-id" type="xs:string" use="required"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="DATUM" type="xs:string"/>
         <xs:element name="KEYWORD" type="xs:string"/>
         <xs:element name="METADATEN">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="DATUM"/>
                        <xs:element ref="TITEL" maxOccurs="unbounded"/>
                        <xs:element ref="KEYWORD" maxOccurs="unbounded"/>
                        <xs:element ref="AUTOR-ID"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="TITEL" type="xs:string"/>
    </xs:schema>
    2. problem: hier i have no idea what is happening ... please help
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00004: internal error "MultiChar overflow"
    Error at line 61
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at test.insertXML(test.java:53)
         at test.main(test.java:259)

    It's hard for me to tell you more without seeing your instance data, but for problem #1, if you look at the underlying SQL types being generated by your schema, you will see that the default SQL mapping for a "string" in your schema is a VARCHAR2(4000) (and I believe this would be only 2000 for a varying width character set like UTF8).
    You can specify that you wish this column to be mapped as a CLOB in your schema if this is the problem. Also note that there is a 64K limit on the size of an individual node in XMLType.

  • LONG_RAW conversion (using OLE) to file system then import into BLOB column

    To whom it may concern (I will call "hero" or "savior" if you can solve this for me),
    I posted this message an another thread; but then later thought it would be better in its own thread.
    I was wondering how to extract the Adobe Acrobat Reader files (PDF) from OLE component stored in a LONG_RAW database column. I was able to successfully extract the MS-Word, MS-Excel, MS-Powerpoint, and MS-Project to the operating system. I was not able to extract the Adobe PDF files. The PDF files do not return an error message nor do they write out to the file system?
    Leonid previous posted some suggestions on how to convert the data. Can anyone expand on tasks #4 and #5 (see below)?
    You can use this library to do the following task:
    1. Get the type of an object stored inside OLE Item. Get information about the OLE server.
    GetCLSID, GetProgID, IsIDispatchSupported
    2. Get information about the object
    IsLinked, GetSourceDisplayName
    3. Get information from the object in formats supported by its IDataObject interface.
    EnumFormatEtc, RegClipFormat, GetData
    I suppose it's the best way to extract pictures!
    4. Save the object into an external file throu IPersistFile interface. It works only if IPersistFile::Save method is implemented by the OLE server. Unfortunately, some OLE servers don't support this method even don't return a correct error code.
    SaveToFile
    Works with: MS Word, MS Excel
    Not works with: Adobe Acrobat (I'm not sure. Maybe I've done something wrong), MS Photo Editor
    5. Extract the 'Contents' stream from a structured storage /a compound document/.
    ExtractToFile
    It isn't a documented way, but it can be used to extract PDF files.
    I have tried the following two scenarios for the PDF extraction:
    -- First Attempt
    ret:=OLEXTRA.SaveToFile( application, v_FILENAME_WO_EXT || '.pdf' );
    if ret <> 0 then
    show_message( 'SaveToFile Error code='||ret );
    end if;
    -- application does not return an error message
    -- application does not save the PDF file to the operating system.
    -- Second Attempt
    ret:=OLEXTRA.ExtractToFile( application, 'stg.pdf', 'fname.pdf' );
    if ret <> 0 then
    show_message( 'ExtractToFile Error code='||ret );
    end if;
    -- application does not return an error message.
    -- application does not save fname.pdf to the operating system
    -- application saves the stg.pdf to file system, but cannot open in Adobe
    Thanks in advance for the help,
    Mike

    There is no way from PL/SQL in Forms - you'll have to call out to C or Java Code to do it.
    You can link in Pro*C or OCI code into forms as a user exit in which case it can share the forms connection but that's not for the faint hearted.
    Using Java - called from the Java Importer feature in 6i+ you'll end up creating a separate connection.
    Frankly if you can do it in a generic enough way through a VB executable stick with that.
    Forms can get images in an out of a long raw using read_image_file and write_image_file but that does not extend to any binary file - just images.

  • How to insert large xml file ino xmltype column

    Hi all,
    iam using oracle10g. I have a table example1(key_column varchar2(10),xml_column xmltype) like this. i want to insert xml file from server to xmltype column. Can you please anybody suggest regarding this.wht is the size of the xmltype column. is it same as clob like 2GB or sth different. and one more thing is iam creating one procedure in that procedure , in that we are fetching xmltype value into clob varable. is it correct or not...
    Thanks

    Manipulating a single XMLType of 2GB is probably not sensible period. I'm guessing that the content of a file that big is probably a set of smaller XML documents which someone has wrapped a begin and end tag around. Since databases are good at handling collections of documents (or collections of anything else for that matter), you should consider de-compising the large document back into a set of smaller documents before storing it in the database

  • How to insert large xml file to XMLType column?

    Hi,
    I have a table with one column as XMLType(Binary XML storage option and Free Text Indexing). When i try to insert a large XML as long as 8kb, i'm getting an error ORA-01704:string literal too long.
    Insert into TEST values(XMLTYPE('xml HERE'));
    How to insert large XML values to XMLType column?
    Regards,
    Sprightee

    For a large XML file, you basically have two options - you can load the string directly as an XMLType, or you can load the string as a CLOB and cast it on the database side to an XMLType.
    If you decide to load the XML as XmlType client-side, then you may be interested to know that versions of Oracle after 11.2.0.2 support the JDBC 4.0 SQLXML standard. See the JDBC driver release documentation here:
    http://docs.oracle.com/cd/E18283_01/java.112/e16548/jdbcvers.htm#BABGHBCC
    If you want to load as a CLOB, then you'll need to use PreparedStatement's setClob() method, or allocate an oracle.sql.clob object.
    For versions before 11.2.0.2, you can create an XMLType with a constructor that includes an InputStream or byte[] array.
    HTH
    Edited by: 938186 on Jun 23, 2012 11:43 AM

  • Updating the whole xml file in  XMLType column

    Hi ,
    I am facing the problem in updating the XMLTYPE column.
    I need to update the whole xml file
    This is my table
    SQL> desc EMPJAL_TABLE;
    Name Null? Type
    EMPLOYEEID NOT NULL VARCHAR2(140)
    EMPCOM VARCHAR2(100)
    EMPJAL SYS.XMLTYPE(XMLSchema "www.EMPSIM.com" Element "EMPJAL") STORAGE
    Object-relational TYPE "EMPJAL_T"
    I am able to form the CLOB object and trying to use this sql command
    UPDATE EMPJAL_TABLE SET EMPJAL = XMLType( ? ) ) WHERE EMPLOYEEID ='emp1234';
    Here I want to update the whole xmlfile in XMLTYPE column.
    Error is - ORA-00933: SQL command not properly ended
    Please advise
    Thanks
    Govinds

    Hi Mark,
    I apologise for this mistake. I am really putting lot of efforts and also worked/working in advance topics of XML DB.
    Yes I am extensively using Oracle 10g r2 and suggesting others to use this
    This time I had put more effort before posting ,I had a series of queries to resolve most of then were working , this was the one giving problem inside my java code
    I am sorry for this .
    Any how I made another query which works better.
    Thanks
    Govinda

  • How/Where are Financial Reports Saved on the File System of the Server?

    We've recently lost a large chunk of our reports on our server. We can't figure out which directory location to restore in order to get those reports back. Where is the default directory for 11.1.2.2 Financial Reports? And in what format are those reports saved?

    The FR reports themselves are found in the Operating System (O/S) file system, but the EPM Workspace heirarchy (folders, tree, etc) are stored in the Hyperion BI+ repository database.
    On the O/S file system, the reports are stored in RM1 folder under "C:\oracle\Middleware\user_projects\epmsystem1\ReportingAnalysis\data\RM1\root" folder.
    The names of the reports located here are UUID (long identifiers - not the actual names).
    For example:
            when a report is created with the name"My report" in the Financial Reporting Studio, when logging into EPM Workspace it will be accessible within Financial Reports/folder name where it was saved.
            the actual report will be stored in a sub-folder of the RM1\root folder on file system.
                The name of the file will be a unique identifier (not the actual name of the report i.e. "My report")
                It will be generated "on the fly" based on various things such as the current date and time on the server (i.e 0000012f5af72b1a-0000-ec71-c0a8006c.00000130510b77bb-0000-5133-c0a8006c.1)
    The meta-data for that report ("My report", that is in the folder in Workspace, the modification date of the report, the permissions on that report, etc.) will be stored in the Hyperion BI+ DB as an object in an encrypted table. Financial Reporting knows what meta-data is in the Hyperion BI+ DB that matches the report, in the "RM1\root" folder because all the rows in the table for this object in the Hyperion BI+ DB that are related to "My report" will be referenced using the UUID of the file (e.g. 0000012f5af72b1a-0000-ec71-c0a8006c.00000130510b77bb-0000-5133-c0a8006c.1)
    Note: The location of RM1 folder differs with each installations' operating system.

  • VI Analyzer "Some VIs and/or tests have been added to or removed from your file system since you last saved this configuration file."

    When I run VI analyzer and open our standard config file, the message "Some VIs and/or tests have been added to or removed from your file system since you last saved this configuration file." appears. Upon clicking OK, selecting something to analyze, and moving on to the VI  Analyzer - Select Tests dialog, the Tests selection control is completely empty and the Analyze button is greyed out.
    I'm runing LabVIEW 2013 on Windows 7, VI analyzer did work before, and I have tried both repairing and uninstalling LabVIEW (then reinstalling) already. If I do not select a config file or try to reset all test configurations, the Tests control remains empty.
    Is there any way to reinstate the tests, or fix just the VI Analyzer toolkit?
    The only thing that I remember changing since I last ran the analyzer is that I installed DIAdem.
    Solved!
    Go to Solution.

     The suggested search (from LV2013) brought me to the 2014 toolkit,
    That is unfortunate.  
    Perhaps the Tools network needs a tweak
    But, I had assumed you had your SSP up to date and LabVIEW 2014 installed.  The download would have worked then
    Jeff

  • Getting the system generated column name for xmltype column

    Hello,
    how i can get the internal column name (p.a. SYS_NC00001$) for a xmltype column? I cannot find a correct dictionary view .
    I need that for moving a xmltype lob partition to another tablespace.
    Thanks,
    MaikR

    Does the following help:
    http://www.idevelopment.info/data/Oracle/DBA_tips/LOBs/LOBS_2.shtml
    http://www.liberidu.com/blog/?p=264

  • Inserting XML data into xmltype column

    Oracle version: 10.1.0.5
    OpenVms Alpha V8.3
    1) Tried this and get the error shown below. Removed charset and placed a zero. Same error.
    INSERT INTO xml_demo (xml_data) -- column of xmltype
    VALUES
    xmltype
    bfilename('XML_DIR', 'MOL.XML'),
    nls_charset_id('AL32UTF8')
    ORA-22993: specified input amount is greater than actual source amount
    ORA-06512: at "SYS.DBMS_LOB", line 637
    ORA-06512: at "SYS.XMLTYPE", line 283
    ORA-06512: at line 1
    2) This PL/SQL block works. However maximum raw size around 32K. The file can be around 100K. May be I can load it into a table of raw and somehow concatnate it to insert. Not sure whether this is possible but I am sure there must me a simple way of doing this.
    Subset of the xml file is pasted below.
    set serveroutput on size 1000000
    DECLARE
    file1 bfile;
    v_xml XMLType;
    len1 number(6);
    v_rec1 raw(32000);
    BEGIN
    file1 := bfilename('XML_DIR','MOL.XML');
    DBMS_LOB.fileopen(file1, DBMS_LOB.file_readonly);
    len1 := DBMS_LOB.getLength(file1);
    v_rec1 := dbms_lob.substr(file1,len1,1);
    v_xml := xmltype(UTL_RAW.CAST_TO_VARCHAR2(v_rec1));
    INSERT INTO xml_demo (xml_data) VALUES (v_xml);
    COMMIT;
    DBMS_LOB.fileclose(file1);
    exception
    when others then
    dbms_output.put_LINE (sqlerrm);
    DBMS_LOB.fileclose(file1);
    END;
    <?xml version="1.0" encoding="UTF-8"?>
    <MolDocument DtdVersion="3" DtdRelease="0">
    <DocumentIdentification v="MOL_20100331_1500_1600"/>
    <DocumentVersion v="1"/>
    <DocumentType v="A43"/>
    <SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
    <SenderRole v="A35"/>
    <ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
    <ReceiverRole v="A04"/>
    <CreationDateTime v="2010-03-31T14:10:00Z"/>
    <ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Domain codingScheme="A01" v="10YDOM-1001A001A"/>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_16"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    </MolDocument>

    Marc
    Thanks. I understand what you are saying. I have been copying files in binary mode from NT servers into VMS. I have to get a proper xml file via FTP from the originating system to further investigate.
    I have one last item i need help on. If anything looks obvious let me know:
    +1) The xsd defintion of Qty (type: QuantityType) and EnergyPrice (type: Amount Type)+
                   <xsd:element name="Qty" type="ecc:QuantityType">
                        <xsd:annotation>
                             <xsd:documentation/>
                        </xsd:annotation>
                   </xsd:element>
                   <xsd:element name="EnergyPrice" type="ecc:AmountType" minOccurs="0">
                        <xsd:annotation>
                             <xsd:documentation/>
                        </xsd:annotation>
                   </xsd:element>
    +2) Definition of AmountType and QuantityType in the parent xsd+
         <xsd:complexType name="AmountType">
              <xsd:annotation>
                   <xsd:documentation>
                        <Uid>ET0022</Uid>
                        <Definition>The monetary value of an object</Definition>
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:attribute name="v" use="required">
                   <xsd:simpleType>
                        <xsd:restriction base="xsd:decimal">
                             <xsd:totalDigits value="17"/>
                        </xsd:restriction>
                   </xsd:simpleType>
              </xsd:attribute>
         </xsd:complexType>
         <!--_________________________________________________-->
         <xsd:complexType name="QuantityType">
              <xsd:annotation>
                   <xsd:documentation>
                        <Uid>ET0012</Uid>
                        <Definition>(Synonym "qty") The quantity of an energy product. Positive quantities shall not have a sign.</Definition>
                   </xsd:documentation>
              </xsd:annotation>
              <xsd:attribute name="v" type="xsd:decimal" use="required"/>
         </xsd:complexType>
         <!--________________
    +3. Data in the XML file+
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    +4) When I do the load:+
    the EnergyPrice is saved in the xmltype column as <EnergyPrice v="50"/>
    Losing its decimal value of .45
    +5) When I select as follows:+
    **DEV** SQL>> l
    1 SELECT
    2 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v') v1,
    3 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice') v2,
    4 EXTRACTVALUE(x2.column_value,'/MolTimeSeries/Period/Interval/Qty') v3
    5 FROM balit_mol_xml x,
    6 TABLE(
    7 XMLSEQUENCE(
    8 EXTRACT(x.xml_payload, '/MolDocument/MolTimeSeries')
    9 )
    10 ) x2
    11* WHERE EXISTSNODE(x.xml_payload,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1
    +6) get the result+
    50
    AmountType479_T(XDB$RAW_LIST_T('1301000000'), 50)
    QuantityType471_T(XDB$RAW_LIST_T('1301000000'), 50)
    +7) XDB$RAW_LIST_T('1301000000'),+
    Does that tell what I am doing wrong?

  • XMLType column based on XML Schema: several questions

    Hi,
    I've a table on an oracle db version 10.1.0.4 where I stage the xml files containing orders created on a third party's system using BizTalk.
    Although the storage I opted for is based on an XML Schema, defined by this third-party, I am facing big perfomance issues with files bigger than a few hundreds of kBs.
    For instance, a 32Mb file takes more than 2 hours to be processed.
    Now, after reading other threads in this forum and the documentation, my understanding of the problem is that the whole issue is with the correct indexing of the nested tables.
    Here is my current XML Schema definition:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
                   xmlns:xs="http://www.w3.org/2001/XMLSchema"
                   xmlns:xdb="http://xmlns.oracle.com/xdb"
                   elementFormDefault="qualified"
                   attributeFormDefault="unqualified"
                   xdb:storeVarrayAsTable="true">
         <xs:include schemaLocation="private/Types.xsd"/>
         <xs:element name="PickData">
              <xs:complexType xdb:maintainDOM="false">
                   <xs:sequence>
                        <xs:element name="ProdRun">
                             <xs:complexType xdb:maintainDOM="false">
                                  <xs:sequence>
                                       <xs:element name="Nr" type="xs:int"/>
                                       <xs:element name="Date" type="string8"/>
                                       <xs:element name="Final" type="xs:int"/>
                                       <xs:element name="PickWave" maxOccurs="unbounded">
                                            <xs:complexType xdb:maintainDOM="false">
                                                 <xs:sequence>
                                                      <xs:element name="Nr" type="string10"/>
                                                      <xs:element name="ProdLine" type="string2"/>
                                                      <xs:element name="TourSeq" type="xs:int"/>
                                                      <xs:element name="Tour" type="string20"/>
                                                      <xs:element name="Customer" maxOccurs="unbounded">
                                                           <xs:complexType xdb:maintainDOM="false">
                                                                <xs:sequence>
                                                                     <xs:element name="Seq" type="string20"/>
                                                                     <xs:element name="Cust" type="string10"/>
                                                                     <xs:element name="Mod" type="string30"/>
                                                                     <xs:element name="Tod" type="string30"/>
                                                                     <xs:element name="InvOrder" maxOccurs="unbounded">
                                                                          <xs:complexType xdb:maintainDOM="false">
                                                                               <xs:sequence>
                                                                                    <xs:element name="Nr" type="string20"/>
                                                                                    <xs:element name="Item" type="string20"/>
                                                                                    <xs:element name="Qty" type="xs:int"/>
                                                                                    <xs:element name="Priority" type="xs:int"/>
                                                                                    <xs:element name="Reordering" type="xs:int"/>
                                                                                    <xs:element name="DelDate" type="string8"/>
                                                                                    <xs:element name="HlOrder" type="string20"/>
                                                                               </xs:sequence>
                                                                          </xs:complexType>
                                                                          <xs:unique name="InvOrderKey">
                                                                               <xs:selector xpath="InvOrder"/>
                                                                               <xs:field xpath="Nr"/>
                                                                          </xs:unique>
                                                                     </xs:element>
                                                                </xs:sequence>
                                                           </xs:complexType>
                                                           <xs:unique name="CustomerKey">
                                                                <xs:selector xpath="Customer"/>
                                                                <xs:field xpath="Seq"/>
                                                           </xs:unique>
                                                      </xs:element>
                                                 </xs:sequence>
                                            </xs:complexType>
                                            <xs:unique name="PickWaveKey">
                                                 <xs:selector xpath="PickWave"/>
                                                 <xs:field xpath="Nr"/>
                                            </xs:unique>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                             <xs:unique name="ProdRunKey">
                                  <xs:selector xpath="ProdRun"/>
                                  <xs:field xpath="Nr"/>
                             </xs:unique>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Here is the included sub-schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <xsd:simpleType name="string2">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="2"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string5">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="5"/>
    </xsd:restriction>
    </xsd:simpleType>
              <xsd:simpleType name="string6">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="6"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string8">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="8"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string10">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="10"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string15">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="15"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string20">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="20"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string30">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="30"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string40">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="40"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string50">
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="string250">
                   <xsd:restriction base="xsd:string">
                        <xsd:maxLength value="250"/>
                   </xsd:restriction>
              </xsd:simpleType>
         </xsd:schema>
    The statement for creating my table is
    CREATE TABLE "XML_ORDERS"
    ("ID" NUMBER(7,0) NOT NULL ENABLE,
    "XMLFILE" "SYS"."XMLTYPE" ,
    "INSERTED" DATE DEFAULT sysdate,
    CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
    ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
    XMLSCHEMA "private/PickData.xsd" ELEMENT "PickData"
    Here is a simple instance document:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <PickData xsi:noNamespaceSchemaLocation="private/PickData.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ProdRun>
    <Nr>5</Nr>
    <Date>15112005</Date>
    <Final>1</Final>
    <PickWave>
    <Nr>IPW0000017</Nr>
    <ProdLine>01</ProdLine>
    <TourSeq>1</TourSeq>
    <Tour>00000043_078</Tour>
    <Customer>
    <Seq>5</Seq>
    <Cust>100000006</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000457</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000459</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000742</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>6</Seq>
    <Cust>100000013</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000461</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000463</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000743</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>2</Seq>
    <Cust>100000114</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000465</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000467</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000744</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>3</Seq>
    <Cust>100000140</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000469</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000471</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000745</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>7</Seq>
    <Cust>100000143</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000473</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000475</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000746</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>8</Seq>
    <Cust>100000145</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000477</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000479</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000747</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>9</Seq>
    <Cust>100000146</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000481</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000483</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000748</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>4</Seq>
    <Cust>100000147</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000485</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000487</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000750</HlOrder>
    </InvOrder>
    </Customer>
    <Customer>
    <Seq>10</Seq>
    <Cust>100000148</Cust>
    <Mod>FO</Mod>
    <Tod>DDU</Tod>
    <InvOrder>
    <Nr>IIO0000489</Nr>
    <Item>100000036</Item>
    <Qty>20</Qty>
    <Priority>0</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    <InvOrder>
    <Nr>IIO0000491</Nr>
    <Item>100000045</Item>
    <Qty>20</Qty>
    <Priority>1</Priority>
    <Reordering>0</Reordering>
    <DelDate>15112005</DelDate>
    <HlOrder>CSO000751</HlOrder>
    </InvOrder>
    </Customer>
    </PickWave>
    </ProdRun>
    </PickData>
    When I registered the XMLSchema, the following types and tables were automatically created and you can see the hierarchy below:
    (by the way, I could not find any xdb_utilities.printNestedTables mentioned elsewhere)
    XML_ORDERS
    |_PickData381_T
    |___ProdRun382_T
    |_____PickWave388_COLL
    |_______PickWave383_T
    |_________Customer387_COLL
    |___________Customer384_T
    |_____________InvOrder386_COLL
    These objects are then used in the following nested tables:
    TABLE_NAME     TABLE_TYPE_NAME     PARENT_TABLE_NAME     PARENT_TABLE_COLUMN
    SYS_NTaK/5zar5S0WitSsgu6OKPQ==     PickWave388_COLL     PickData389_TAB     "XMLDATA"."ProdRun"."PickWave"
    SYS_NTf6QvwVm8SFKz+K/YYWq+WQ==     Item408_COLL     ProdData409_TAB     "XMLDATA"."Item"
    SYS_NTtu05ilrRQqmuEN4k+07VDA==     Customer402_COLL     OutboundParty403_TAB     "XMLDATA"."Customer"
    SYS_NTK6fhWq5uTJ+vKcgBpNm1Fg==     InvOrder386_COLL     SYS_NTIIzv7bkXQSSS43igtfi5eg==     InvOrder
    SYS_NTIIzv7bkXQSSS43igtfi5eg==     Customer387_COLL     SYS_NTaK/5zar5S0WitSsgu6OKPQ==     Customer
    I enabled sql tracing and I got the following TKPROF output
    INSERT INTO IMP_ORDERS (PICK_INVORDERNR, PICK_ITEM, PICK_QTY, PICK_PRIORITY,
    PICK_REORDERING, PICK_HLORDER, PICK_DELDATE, PICK_CUST, PICK_MOD, PICK_TOD,
    PICK_SEQ, PICK_PICKWAVENR, PICK_PICKWAVEPRODLINE, PICK_PICKWAVETOUR,
    PICK_PICKWAVETOURSEQ, PICK_ORDKEY, PICK_RUNKEY) SELECT INVORDERNR, ITEM,
    QTY, PRIORITY, REORDERING, HLORDER, DELDATE, CUST, MOD, TOD, SEQ,
    PICKWAVENR, PICKWAVEPRODLINE, PICKWAVETOUR, PICKWAVETOURSEQ, ROWNUM AS
    PICK_ORDKEY, PRODRUNID FROM (SELECT /*+ cardinality(g 15)*/
    EXTRACTVALUE(VALUE(G), '/InvOrder/Nr') AS INVORDERNR, EXTRACTVALUE(VALUE(G),
    '/InvOrder/Item') AS ITEM, EXTRACTVALUE(VALUE(G), '/InvOrder/Qty') AS QTY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Priority') AS PRIORITY,
    EXTRACTVALUE(VALUE(G), '/InvOrder/Reordering') AS REORDERING,
    EXTRACTVALUE(VALUE(G), '/InvOrder/HlOrder') AS HLORDER,
    TO_DATE(EXTRACTVALUE(VALUE(G), '/InvOrder/DelDate'),'DDMMYYYY') AS DELDATE,
    F.CUST, F.MOD, F.TOD, F.SEQ, F.PICKWAVENR, F.PICKWAVEPRODLINE,
    F.PICKWAVETOUR, F.PICKWAVETOURSEQ, F.PRODRUNNR, F.PRODRUNDATE,
    F.PRODRUNFINAL, F.PRODRUNID FROM (SELECT /*+ cardinality(e 60)*/VALUE(E) AS
    CUSTOMERNODE, EXTRACTVALUE(VALUE(E), '/Customer/Cust') AS CUST,
    EXTRACTVALUE(VALUE(E), '/Customer/Mod') AS MOD, EXTRACTVALUE(VALUE(E),
    '/Customer/Tod') AS TOD, TO_NUMBER(EXTRACTVALUE(VALUE(E), '/Customer/Seq'))
    AS SEQ, D.PICKWAVENR, D.PICKWAVEPRODLINE, D.PICKWAVETOUR, D.PICKWAVETOURSEQ,
    D.PRODRUNNR, D.PRODRUNDATE, D.PRODRUNFINAL, D.PRODRUNID FROM (SELECT /*+
    cardinality(c 100)*/VALUE(C) AS PICKWAVENODE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Nr') AS PICKWAVENR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/ProdLine')) AS PICKWAVEPRODLINE, EXTRACTVALUE(VALUE(C),
    '/PickWave/Tour') AS PICKWAVETOUR, TO_NUMBER(EXTRACTVALUE(VALUE(C),
    '/PickWave/TourSeq')) AS PICKWAVETOURSEQ, A.PRODRUNNR, A.PRODRUNDATE,
    A.PRODRUNFINAL, A.PRODRUNID FROM (SELECT /*+ cardinality(b 1)*/VALUE(B) AS
    PRODRUNNODE, EXTRACTVALUE(VALUE(B), '/ProdRun/Nr') AS PRODRUNNR,
    TO_DATE(EXTRACTVALUE(VALUE(B), '/ProdRun/Date'),'DDMMYYYY') AS PRODRUNDATE,
    EXTRACTVALUE(VALUE(B), '/ProdRun/Final') AS PRODRUNFINAL, X.ID PRODRUNID
    FROM XML_ORDERS X, TABLE(XMLSEQUENCE(EXTRACT(X.XMLFILE,'/PickData/ProdRun'))
    ) B WHERE X.ID = :B1 ) A, TABLE(XMLSEQUENCE(EXTRACT(A.PRODRUNNODE,
    '/ProdRun/PickWave'))) C ) D, TABLE(XMLSEQUENCE(EXTRACT(D.PICKWAVENODE,
    '/PickWave/Customer'))) E ) F, TABLE(XMLSEQUENCE(EXTRACT(F.CUSTOMERNODE,
    '/Customer/InvOrder'))) G ORDER BY PICKWAVEPRODLINE, PICKWAVETOURSEQ,
    PICKWAVENR, SEQ )
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 4324.09 9994.65 0 57193 0 0
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 4324.09 9994.65 0 57193 0 0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 68 (recursive depth: 1)
    Rows Row Source Operation
    0 COUNT (cr=0 pr=0 pw=0 time=180 us)
    0 VIEW (cr=0 pr=0 pw=0 time=166 us)
    0 SORT ORDER BY (cr=0 pr=0 pw=0 time=152 us)
    40866 NESTED LOOPS (cr=54973 pr=0 pw=0 time=31065606 us)
    1363 NESTED LOOPS (cr=54937 pr=0 pw=0 time=11037183 us)
    1 NESTED LOOPS (cr=54889 pr=0 pw=0 time=10145883 us)
    1 NESTED LOOPS (cr=54841 pr=0 pw=0 time=9799012 us)
    1 TABLE ACCESS BY INDEX ROWID XML_ORDERS (cr=2 pr=0 pw=0 time=222 us)
    1 INDEX UNIQUE SCAN XML_ORDERS_PK (cr=1 pr=0 pw=0 time=126 us)(object id 58551)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=54839 pr=0 pw=0 time=9798748 us)
    1 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=346818 us)
    1363 COLLECTION ITERATOR PICKLER FETCH (cr=48 pr=0 pw=0 time=870830 us)
    40866 COLLECTION ITERATOR PICKLER FETCH (cr=36 pr=0 pw=0 time=18739302 us)
    Note that I cancelled this operation before it was over so I imagine that these figures refer to the statistics as of the time when the operation was interrupted.
    So, here are finally my questions.
    In order to create the constraints on the nested tables as shown in other threads, do I need to drop the existing xml_orders table and ancillary object types and recreate them or is there a way to add such constraints using the existing system generated object names?
    Secondly, the xml_orders table may contain severale documents, not just one and his current primary key is the column ID. So, in order to uniquely identify the deepest element in the xml document, I need first to select the relevant document by means of the id column.
    Would it be better to create the indexes containing this id column together with the nested_table_id and array_index?
    Thanks for you help.
    Flavio
    PS: I wrote a 10 lines xsl transformation that I passed on to Saxon together with the 32Mb file. It took less than 1 minute to produce a flat file that was loaded almost instantly by SQL*Loader. So, what I am looking for is a procedure loading this stuff in less than 2 minutes or possibly less.

    Does the following help
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:53 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/GetaxTypes.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'GetaxTypes.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/GetaxTypes.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/GetaxTypes.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:55 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool registerSchema_&4..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> declare
      2    result boolean;
      3  begin
      4    result := dbms_xdb.createResource('/home/&1/xsd/&4',
      5                                      bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
      6  end;
      7  /
    old   4:   result := dbms_xdb.createResource('/home/&1/xsd/&4',
    new   4:   result := dbms_xdb.createResource('/home/OTNTEST/xsd/PickData.xsd',
    old   5:                                    bfilename(USER,'&4'),nls_charset_id('AL32UTF8'));
    new   5:                                    bfilename(USER,'PickData.xsd'),nls_charset_id('AL32UTF8'));
    PL/SQL procedure successfully completed.
    SQL> commit
      2  /
    Commit complete.
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    SQL> begin
      2    dbms_xmlschema.registerSchema
      3    (
      4      schemaURL => '&3',
      5      schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
      6      local     => TRUE,
      7      genTypes  => TRUE,
      8      genBean   => FALSE,
      9      genTables => &5
    10    );
    11  end;
    12  /
    old   4:     schemaURL => '&3',
    new   4:     schemaURL => 'private/PickData.xsd',
    old   5:     schemaDoc => xdbURIType('/home/&1/xsd/&4').getClob(),
    new   5:     schemaDoc => xdbURIType('/home/OTNTEST/xsd/PickData.xsd').getClob(),
    old   9:     genTables => &5
    new   9:     genTables => TRUE
    PL/SQL procedure successfully completed.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:58 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool createTable.log
    SQL> --
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> CREATE TABLE "XML_ORDERS"
      2     ("ID" NUMBER(7,0) NOT NULL ENABLE,
      3      "XMLFILE" "SYS"."XMLTYPE" ,
      4      "INSERTED" DATE DEFAULT sysdate,
      5       CONSTRAINT "XML_ORDERS_PK" PRIMARY KEY ("ID") USING INDEX ENABLE
      6     ) XMLTYPE COLUMN XMLFILE STORE AS OBJECT RELATIONAL
      7       XMLSCHEMA "private/PickData.xsd"
      8       ELEMENT "PickData"
      9           VARRAY XMLFILE."XMLDATA"."ProdRun"."PickWave" STORE AS TABLE PickWave_TAB
    10             (
    11                ( primary key (nested_table_id, array_index)
    12                ) organization index overflow
    13                VARRAY "Customer" STORE AS TABLE Customer_TAB
    14                  (
    15                    (primary key (nested_table_id, array_index)
    16                    ) organization index overflow
    17                    VARRAY "InvOrder" STORE AS TABLE InvOrder_TAB
    18                      (
    19                        (primary key (nested_table_id, array_index)
    20                        ) organization index overflow
    21                      )
    22                  )
    23            )
    24  /
    Table created.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool insertFile_&3..log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> --
    SQL> insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
      2  /
    old   1: insert into XML_ORDERS (ID, XMLFILE) values (&4, xmltype(bfilename(USER,'&3'),nls_charset_id('AL32UTF8')))
    new   1: insert into XML_ORDERS (ID, XMLFILE) values (10, xmltype(bfilename(USER,'testcase.xml'),nls_charset_id('AL32UT
    8')))
    1 row created.
    Elapsed: 00:00:00.11
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Dec 27 21:44:59 2005
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> spool testcase.log
    SQL> set trimspool on
    SQL> connect &1/&2
    Connected.
    SQL> --
    SQL> set timing on
    SQL> set long 10000
    SQL> set pages 0 lines 140
    SQL> --
    SQL> -- Testcase code here
    SQL> --
    SQL> set autotrace on explain
    SQL> --
    SQL> create or replace view PROD_RUN_VIEW
      2  (
      3    PRODRUNNODE,
      4    PRODRUNNR,
      5    PRODRUNDATE,
      6    PRODRUNID,
      7    PRODRUNFINAL
      8  )
      9  as
    10  select EXTRACT(XMLFILE,'/PickData/ProdRun'),
    11         EXTRACTVALUE(XMLFILE , '/PickData/ProdRun/Nr'),
    12         TO_DATE(EXTRACTVALUE(XMLFILE, '/PickData/ProdRun/Date'),'DDMMYYYY'),
    13         ID,
    14         EXTRACTVALUE(XMLFILE,'/PickData/ProdRun/Final')
    15    from XML_ORDERS
    16  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view PICK_WAVE_VIEW
      2  (
      3    PICKWAVENODE,
      4    PICKWAVENR,
      5    PICKWAVEPRODLINE,
      6    PICKWAVETOUR,
      7    PICKWAVETOURSEQ,
      8    PRODRUNNR,
      9    PRODRUNDATE,
    10    PRODRUNID,
    11    PRODRUNFINAL
    12  )
    13  as
    14  select value(PW),
    15         extractValue(value(PW),'/PickWave/Nr'),
    16         TO_NUMBER(EXTRACTVALUE(value(PW),'/PickWave/ProdLine')),
    17         extractValue(value(PW),'/PickWave/Tour'),
    18         TO_NUMBER(extractValue(value(PW),'/PickWave/TourSeq')),
    19         PRODRUNNR,
    20         PRODRUNDATE,
    21         PRODRUNID,
    22         PRODRUNFINAL
    23    FROM PROD_RUN_VIEW, table(xmlsequence(extract(PRODRUNNODE,'/ProdRun/PickWave'))) PW
    24  /
    View created.
    Elapsed: 00:00:00.09
    SQL> create or replace view CUSTOMER_VIEW
      2  (
      3    CUSTOMERNODE,
      4    CUST,
      5    MOD,
      6    TOD,
      7    SEQ,
      8    PICKWAVENR,
      9    PICKWAVEPRODLINE,
    10    PICKWAVETOUR,
    11    PICKWAVETOURSEQ,
    12    PRODRUNNR,
    13    PRODRUNDATE,
    14    PRODRUNFINAL,
    15    PRODRUNID
    16  )
    17  as
    18  select value(CUST),
    19         EXTRACTVALUE(VALUE(CUST), '/Customer/Cust'),
    20         EXTRACTVALUE(VALUE(CUST), '/Customer/Mod'),
    21         EXTRACTVALUE(VALUE(CUST), '/Customer/Tod'),
    22         TO_NUMBER(EXTRACTVALUE(VALUE(CUST), '/Customer/Seq')),
    23         PICKWAVENR,
    24         PICKWAVEPRODLINE,
    25         PICKWAVETOUR,
    26         PICKWAVETOURSEQ,
    27         PRODRUNNR,
    28         PRODRUNDATE,
    29         PRODRUNFINAL,
    30         PRODRUNID
    31    from PICK_WAVE_VIEW, table(xmlsequence(extract(PICKWAVENODE,'/PickWave/Customer'))) CUST
    32  /
    View created.
    Elapsed: 00:00:00.10
    SQL>
    SQL> create or replace view INVOICE_ORDER_VIEW
      2  (
      3    INVORDERNR,
      4    ITEM,
      5    QTY,
      6    PRIORITY,
      7    REORDERING,
      8    HLORDER,
      9    DELDATE,
    10    CUST,
    11    MOD,
    12    TOD,
    13    SEQ,
    14    PICKWAVENR,
    15    PICKWAVEPRODLINE,
    16    PICKWAVETOUR,
    17    PICKWAVETOURSEQ,
    18    PRODRUNNR,
    19    PRODRUNDATE,
    20    PRODRUNFINAL,
    21    PRODRUNID
    22  )
    23  as
    24  SELECT EXTRACTVALUE(VALUE(INV), '/InvOrder/Nr'),
    25         EXTRACTVALUE(VALUE(INV), '/InvOrder/Item'),
    26         EXTRACTVALUE(VALUE(INV), '/InvOrder/Qty'),
    27         EXTRACTVALUE(VALUE(INV), '/InvOrder/Priority'),
    28         EXTRACTVALUE(VALUE(INV), '/InvOrder/Reordering'),
    29         EXTRACTVALUE(VALUE(INV), '/InvOrder/HlOrder'),
    30         TO_DATE(EXTRACTVALUE(VALUE(INV), '/InvOrder/DelDate'),'DDMMYYYY'),
    31         CUST,
    32         MOD,
    33         TOD,
    34         SEQ,
    35         PICKWAVENR,
    36         PICKWAVEPRODLINE,
    37         PICKWAVETOUR,
    38         PICKWAVETOURSEQ,
    39         PRODRUNNR,
    40         PRODRUNDATE,
    41         PRODRUNFINAL,
    42         PRODRUNID
    43   FROM CUSTOMER_VIEW, table(xmlsequence(extract(CUSTOMERNODE,'Customer/InvOrder'))) INV
    44  /
    View created.
    Elapsed: 00:00:00.13
    SQL> select * from INVOICE_ORDER_VIEW
      2  /
    IIO0000461           100000036                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000463           100000045                    20          1          0 CSO000743            15-NOV-05 100000013
    FO                             DDU                                     6 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000473           100000036                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000475           100000045                    20          1          0 CSO000746            15-NOV-05 100000143
    FO                             DDU                                     7 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000469           100000036                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000471           100000045                    20          1          0 CSO000745            15-NOV-05 100000140
    FO                             DDU                                     3 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000489           100000036                    20          0          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000491           100000045                    20          1          0 CSO000751            15-NOV-05 100000148
    FO                             DDU                                    10 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000481           100000036                    20          0          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000483           100000045                    20          1          0 CSO000748            15-NOV-05 100000146
    FO                             DDU                                     9 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000485           100000036                    20          0          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000487           100000045                    20          1          0 CSO000750            15-NOV-05 100000147
    FO                             DDU                                     4 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000457           100000036                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000459           100000045                    20          1          0 CSO000742            15-NOV-05 100000006
    FO                             DDU                                     5 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000477           100000036                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000479           100000045                    20          1          0 CSO000747            15-NOV-05 100000145
    FO                             DDU                                     8 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000465           100000036                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    IIO0000467           100000045                    20          1          0 CSO000744            15-NOV-05 100000114
    FO                             DDU                                     2 IPW0000017                1 00000043_078
                    1
             5 15-NOV-05            1         10
    18 rows selected.
    Elapsed: 00:00:00.22
    Execution Plan
    Plan hash value: 1730223965
    | Id  | Operation                | Name              | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT         |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   1 |  NESTED LOOPS            |                   |    18 | 10278 |   877   (0)| 00:00:11 |
    |   2 |   NESTED LOOPS           |                   |    18 |  8424 |   841   (0)| 00:00:11 |
    |   3 |    MERGE JOIN CARTESIAN  |                   |    18 |  4680 |   805   (0)| 00:00:10 |
    |   4 |     TABLE ACCESS FULL    | XML_ORDERS        |     1 |    67 |     3   (0)| 00:00:01 |
    |   5 |     BUFFER SORT          |                   |    18 |  3474 |   802   (0)| 00:00:10 |
    |   6 |      INDEX FAST FULL SCAN| SYS_IOT_TOP_64187 |    18 |  3474 |   802   (0)| 00:00:10 |
    |*  7 |    INDEX UNIQUE SCAN     | SYS_IOT_TOP_64185 |     1 |   208 |     2   (0)| 00:00:01 |
    |*  8 |     INDEX RANGE SCAN     | SYS_C008783       |     1 |       |     0   (0)| 00:00:01 |
    |*  9 |   INDEX UNIQUE SCAN      | SYS_IOT_TOP_64183 |     1 |   103 |     2   (0)| 00:00:01 |
    |* 10 |    INDEX RANGE SCAN      | SYS_C008785       |     1 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       7 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       8 - access("NESTED_TABLE_ID"="CUSTOMER_TAB"."SYS_NC0000800009$")
       9 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
           filter("NESTED_TABLE_ID"="XML_ORDERS"."SYS_NC0001000011$")
      10 - access("NESTED_TABLE_ID"="PICKWAVE_TAB"."SYS_NC0000800009$")
    Note
       - dynamic sampling used for this statement
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    C:\oracle\xdb\otn\347125>You were sequencing the ProdRun node, which is a mistake. Only nodes which occur multiple times should be sequenced...

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

  • Compare Server Names in Excel sheet from column1 with column 2 and exact matched server names should be saved in column 3 in same Excel sheet

    Hi Guys,
    First of all thanks in advance any help much appriciated.
    I am new in scripting and excel, i am looking for below solution as my job requires daily work of this kind and i came to know by automating this work lots of time can be saved.
    Compare Server Names in Excel sheet from column1  with column 2 and exact matched server names should be saved in column 3 in same Excel sheet.
    Looking solutions first using excel i.e.vlookup itself so that it will not require any approval in my job else using powersell ,vbscript.
    Once again Thanks for you guys.
    /Regards
    Nitesh24in

    Hi Edward,
    Thanks once again
    I have only changed excel file path and after that this is saved as below , i am not sure which three lines should be together in one line. Please advise.
    $excel = New-Object -ComObject Excel.Application
    $Workbook = $excel.Workbooks.Add("F:\NewDocsToReadNitesh26-May2013\Excel\test.xls")
    $WorkSheet = $Workbook.Worksheets.Item(1)
    $WorkSheet.Activate() | Out-Null
    For ($i=1;$i -le $worksheet.UsedRange.Rows.Count;$i++) {
       If ($worksheet.cells.item($i,1).value2 -eq $worksheet.cells.item($i,2).value2) {
          $worksheet.cells.item($i,3).value2 = $worksheet.cells.item($i,1).value2
    }$Workbook.Save()$excel.Quit()[System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$excel) | Out-Null
    Thanks and Regards
    Nitesh24in

Maybe you are looking for