Create XMLDB

How to create XMLDB(Schema) database in Oracle 11g?
Ratnaker&Renjith

See XMLDB FAQ link on this forum (start page) or XMLDB Developers Guide or http://www.liberidu.com/blog/?p=222

Similar Messages

  • Issues faced with XML (Objt-Rel) - Plan to move to Binary XML (schema-less)

    Hi All,
    Our Production DB has Oracle XMLDB implementation using 9 XMLDB Object-Relational
    Tables. These have been implemented almost since a year, and we faced several issues,
    have listed some of the most important ones:
    Obviously it is Object-Relational implementation, so we have 4-5 XSDs to start with that
    support the Object-Relational schema
    1) copyEvolve Issues : Due to changing Business Requirements constantly, we had to constantly
    and continuously modify/upgrade XSDs and then use "copyEvolve" to apply new XSDs
    Encountered several issues with CopyEvolve
    2) "Home-grown" solution to evolve XSD/Schema:
    We came up with our own Solution to migrate/evolve XSD schema.
    a) Backup all data from 9 XML DB Tables to 9 CLOB Tables (data is thus "dereferenced" and "delinked"
    from underlying XSDs
    b) Since data is backed up to CLOB Tables, go ahead and drop the entire schema and register
    new XSDs and recreate Tables. (GRANTS and PUBLIC SYNONYMS reappled, needless to say)
    c) Reload data from backed up CLOB Tables to newly created XMLDB (Obj-Relational) Tables
    Above approach (without "copyEvolve") has worked fine so far and helped in each Release/ every migration
    With our data sets becoming increasingly huge, downtime is not sufficient to follow this successful, home-grown
    approach and as a result we would like to get away from Object-Relational XMLDB Tables altogether.
    3) Our Application currently uses XPath heavily on all 9 XMLDB Tables and we understand XPath is already
    deprecated by Oracle (as of 11.2.0.2)
    We are seriously considering doing the following:
    1) Migrate all 9 XMLDB Tables and modify underlying Storage from "Object-Relational" to Binary XML (Schema-less)
    2) Modify Appln code with all XPath replaced by corresponding XQuery constructs
    3) Replace existing "B-TREE" based Indexes in Object-Relational XMLDB Tables with either a) Indexes on Virtual DB Columns to enforce Primary Key and Unique Constraints and b) XMLIndex on all other Non-Unique Columns instead of
    the corresponding "B-TREE" based Indexes
    What we hope to achieve with the above:
    1) Eliminate XSD Usage completely (and copyEvolve nightmares thereby)
    2) Eliminate Usage of XPath totally
    3) Better Performance overall :-)
    Would like to get some advice and feedback on our Proposed Plan and mainly are we taking the
    right direction especially in respect of Performance, Point 3) listed above
    Any feedback or tips would be truly appreciated
    Regards and Thanks
    Auro

    WRT to XPATH Vs XQuery.
    1. XPATH is a subset of XQuery.. Any XPATH expression is, by definition, an example of simple XQuery expression, so XPATH is not depricated.
    2. What we are depricateing are the older, oracle specific XML operators (EXTRACT(), EXTRACTVALUE(), EXISTSNODE()), that ONLY support XPATH. We are depricating these in favour of the new SQL/XML operators (XMLTABLE, XMLQUERY, XMLEXISTS) defined by the SQL standards committee. These operators provide support for the full XQquery standard, and implicitly all of the XPATH expressions that were supported by the older operators. This menas we strongly recommned that new code, developed to work with 11g make use of nrw newer operators. Personally I cannot see a point where we would ever consider de-supportting the older operators, we are well aware of how much code makes use of them.
    What this means is that any code that is written using the older operators will continue to work, unmodified. However should a bug surface in the use of the older operators, we would strongly recommend that the code in question be migrated to the new operators as part of the remidiation process.
    Also, once the initial pain of learning the new syntax is overcome, I truely believe that the new operators result in much more efficient and mantainable code, so taking the time to do code renevation when possible will probably pay off in the long term...
    WRT to moving away from Schema-Based OR storage, I would look at the kind of changes you have made to the XML Schema. If they are the kind of changes that would be supported by in-place evolution in 11g then you might want to re-consider this. If, on the other hand you are regularly making changes to the XML schema that are not backwardsly compatable with your older XML Schema then Schema-Based binary XML storeage (which is more flexible than Schema-Based Object-Relational storage) or even non-schema based Binary XML may be a better choice for your applicaiton..
    I would experment by registering the oldest version of your XML Schema in 11gR2, and then testing each of the evolutions you have gone through to see if 11GR2 inplace evolution would have managed them. Also, ask yourself do you expect your XML Schema to keep changing so drastically moving forward, or were some of these changes the results of the growing pains associated with learning how to use XML schema effectively. BTW the approach you outline is effectively what CopyEvolve is doing under the covers...
    Bear in mind that for the use-cases Object-Relational storage addesses, when all of the XPATH expressions are correctly re-written into SQL operations on the underlying tables, and where the majority of queries end up accessing or updating leaf-level nodes in the XML, it is unlikely that a Binary XML / Unstructured XML Index combination will deliver similar performance. If you are only accesss a small subset of the leaf-level nodes, creating structured XML Indexes that project out the nodes in question may be able to deliver similar performance to an Object-Relational storage model, but you will need to get the index definitions correct.
    -Mark
    Edited by: mdrake on Mar 7, 2011 7:40 PM

  • How to make use of XMLDB to process large XML and create spatial objects

    For someone new to XMLDB I find it hard to make sense of the enormous amount of information (and easy to get lost in it). So I come here to ask for directions.
    I have to build a procedure that fills a table of spatial objects based on XML input. Basically the XML contains a large amount of elements that describe the geometry type and contain the geometries coordinates. The XML can get quite large (200-300Mb).
    Somehow I have to process each element and create an sdo_geometry object.
    Now let me ask a very broad question: What would be a good way to handle this?

    I have the same question. Any news on this?
    Wijnand

  • Why Doesn't XMLIndex Create and Populate Upon Scale-Up For Eval Table?

    Presently working with Oracle release 11.2.0.1 using xmltype securefile binary xml tables.
    In a quandry here and hoping not to have to open an Oracle SR...
    Able to create a working xmlindex against an 'Acme Eval' table in our development environment against an Acme eval table (estimate ~ 5GB) containing 325,550 rows. Creation takes about 10 mins. No partitioning is being used.
    When trying the exact same xmlindex creation against our, much more powerful, pvs platform environment contaning 13,985,124 rows; the xmlindex object shows up as existing in the data dictionary, but the session never stops running after at least 24 hrs of runtime.
    The pvs hardware environment uses: (1.) 24 processor, (2.) Solaris-64 OS, (3.) 128GB memory.
    Two 1 hr AWR reports for the pvs environment shows a huge amount of logical read/writes. The foreground wait event; 'db file sequential read' dominates the DBTime @ 92%. There is about 4.6 GB physical reads/3.5GB physical writes - not too large relatively speaking. The I/O subsystem is having no problem handling the throughput. The top, by far,Time Model Statistics is the 'sql excute elapsed time' @ 99%. User I/O is the main foreground wait class @92%. These values are similar for both of the AWR report - except one report show the 'CREATE XMLINDEX...' statement as being the top sql. The other report shows ' INSERT INTO CROUTREACH.EVAL_IDX_TAB_I... ' As the top sql.
    Been several days since this post. Hoping someone might be able to provide some insight or share their experiences on xmlindexes scaling up to millions of records in the 5 - 10 gb xmltype table range...
    Regards,
    Rick Blanchard
    The frustration here is; there is no obvious database configuration, physical cpu, memory, or I/O issue - other than the logical gets centered around the db file sequential read' wait event.
    Can't do much as far as adjusting the create index statement and underlying attendent Oracle xml operations - the main frustration factor here...
    The xmlindex is still undergoing record insertions.
    Additionally, in the pvs environment; no dml is allowed on the xmlindex and the select statement that works fine using the xmlindex via the optimizer in the development environment doesnt pick up the xmlindex in the pvs environment - as would be expected if the xmlindex wasn't completely populated.
    Appears the xmlindex record population is stalled...
    In the pvs environment, when performing the dml 'alter index croutreach.eval_xmlindex_ix noparallel';
    get this error - typical when an xmlindex is being populated with records:
    ALTER INDEX croutreach.eval_xmlindex_ix NOPARALLEL
    Error report:
    SQL Error: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
    00054. 00000 -  "resource busy and acquire with NOWAIT specified"
    *Cause:    Resource interested is busy.
    *Action:   Retry if necessary. xmlindex create statement used in both cases is
    (The underlying eval table is also set to a dop of 20):
    CREATE
      INDEX "EVAL_XMLINDEX_IX" ON "EVAL"
        OBJECT_VALUE
      INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
        'XMLTable eval_idx_tab_I XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",  
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/eval''      
    COLUMNS        
    eval_catt VARCHAR2(50) path ''@category'',
    acne_mbr_idd VARCHAR2(50) path ''@acmeMemberId'',
    eval_idd VARCHAR2(50) path ''@evalId'',
    eval_dtt TIMESTAMP WITH TIME ZONE path ''@eval_dt'',
    derivedFact XMLTYPE path ''derivedFacts/ns7:derivedFact'' virtual 
    XMLTable eval_idx_tab_II XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7", 
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/ns7:derivedFact'' passing derivedFact     
    COLUMNS         
    defId VARCHAR2(50) path ''ns7:defId'',
    factSource VARCHAR2(50) path ''ns7:factSource'',
    origInferred_dt TIMESTAMP WITH TIME ZONE path ''ns7:origInferred_dt'',
    typee VARCHAR2(20) path ''ns7:factValue/ns7:type'',
    valuee VARCHAR2(1000) path ''ns7:factValue/ns7:value'',
    defUrn VARCHAR2(100) path ''ns7:defUrn'''
      )parallel 20;The development environment eval table is:
    CREATE
      TABLE "N98991"."EVAL" OF XMLTYPE
        CONSTRAINT "EVAL_ID_PK" PRIMARY KEY ("EVAL_ID") USING INDEX PCTFREE 10
        INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" ENABLE
      XMLTYPE STORE AS SECUREFILE BINARY XML
        TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE NOCOMPRESS
        KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT)
      ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
        "EVAL_DT" AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03"; (::)
    /eval/@eval_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        "EVAL_CAT" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@category'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "ACME_MBR_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "EVAL_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@evalId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      PCTFREE 0 PCTUSED 80 INITRANS 4 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" PARALLEL 20 ;
    CREATE
      INDEX "N98991"."EVAL_XMLINDEX_IX" ON "N98991"."EVAL"
        OBJECT_VALUE
      INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
        'XMLTable eval_idx_tab_I XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",  
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/eval''      
    COLUMNS        
    eval_catt VARCHAR2(50) path ''@category'',
    acne_mbr_idd VARCHAR2(50) path ''@acmeMemberId'',
    eval_idd VARCHAR2(50) path ''@evalId'',
    eval_dtt TIMESTAMP WITH TIME ZONE path ''@eval_dt'',
    derivedFact XMLTYPE path ''derivedFacts/ns7:derivedFact'' virtual 
    XMLTable eval_idx_tab_II XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7", 
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/ns7:derivedFact'' passing derivedFact     
    COLUMNS         
    defId VARCHAR2(50) path ''ns7:defId'',
    factSource VARCHAR2(50) path ''ns7:factSource'',
    origInferred_dt TIMESTAMP WITH TIME ZONE path ''ns7:origInferred_dt'',
    typee VARCHAR2(20) path ''ns7:factValue/ns7:type'',
    valuee VARCHAR2(1000) path ''ns7:factValue/ns7:value'',
    defUrn VARCHAR2(100) path ''ns7:defUrn'''
    CREATE UNIQUE INDEX "N98991"."SYS_C00415365" ON "N98991"."EVAL"
        "SYS_NC_OID$"
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ;
    CREATE UNIQUE INDEX "N98991"."SYS_IL0000688125C00003$$" ON "N98991"."EVAL"
        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 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
        TABLESPACE "ACME_DATA" PARALLEL (DEGREE 0 INSTANCES 0) ;
    CREATE UNIQUE INDEX "N98991"."EVAL_ID_PK" ON "N98991"."EVAL" ("EVAL_ID")
      PCTFREE 10 INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536
      NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
      FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
      DEFAULT) TABLESPACE "ACME_DATA" ;The pvs environment's eval table and xmlindex defintion is:
    CREATE
      TABLE "CROUTREACH"."EVAL" OF XMLTYPE
        CONSTRAINT "EVAL_ID_PK" PRIMARY KEY ("EVAL_ID") USING INDEX PCTFREE 10
        INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" ENABLE
      XMLTYPE STORE AS SECUREFILE BINARY XML
        TABLESPACE "ACME_DATA" ENABLE STORAGE IN ROW CHUNK 8192 CACHE NOCOMPRESS
        KEEP_DUPLICATES STORAGE(INITIAL 106496 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT)
      ALLOW NONSCHEMA ALLOW ANYSCHEMA VIRTUAL COLUMNS
        "EVAL_DT" AS (SYS_EXTRACT_UTC(CAST(TO_TIMESTAMP_TZ(SYS_XQ_UPKXML2SQL(
        SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03"; (::)
    /eval/@eval_dt'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2),'SYYYY-MM-DD"T"HH24:MI:SS.FFTZH:TZM') AS TIMESTAMP
    WITH
      TIME ZONE))),
        "EVAL_CAT" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@category'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "ACME_MBR_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@acmeMemberId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50))),
        "EVAL_ID" AS (CAST(SYS_XQ_UPKXML2SQL(SYS_XQEXVAL(XMLQUERY(
        'declare default element namespace "http://www.cigna.com/acme/domains/eval/2010/03";/eval/@evalId'
        PASSING BY VALUE SYS_MAKEXML(128,"XMLDATA") RETURNING CONTENT ),0,0,
        16777216,0),50,1,2) AS VARCHAR2(50)))
      PCTFREE 0 PCTUSED 80 INITRANS 4 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" PARALLEL 20 ;
    CREATE
      INDEX "CROUTREACH"."EVAL_IDX_MBR_ID_EVAL_CAT" ON "CROUTREACH"."EVAL"
        "ACME_MBR_ID",
        "EVAL_CAT"
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" PARALLEL 16 ;
    CREATE UNIQUE INDEX "CROUTREACH"."SYS_C0018448" ON "CROUTREACH"."EVAL"
        "SYS_NC_OID$"
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE
        INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0
        FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT
        CELL_FLASH_CACHE DEFAULT
      TABLESPACE "ACME_DATA" ;
    CREATE UNIQUE INDEX "CROUTREACH"."SYS_IL0000094844C00003$$" ON "CROUTREACH".
      "EVAL"
        PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING STORAGE(INITIAL 65536 NEXT
        1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
        FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
        DEFAULT) TABLESPACE "ACME_DATA" PARALLEL (DEGREE 0 INSTANCES 0) ;
    CREATE UNIQUE INDEX "CROUTREACH"."EVAL_ID_PK" ON "CROUTREACH"."EVAL" ("EVAL_ID"
      ) PCTFREE 10 INITRANS 4 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536
      NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1
      FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE
      DEFAULT) TABLESPACE "ACME_DATA" PARALLEL 16 ;
      CREATE
        INDEX "CROUTREACH"."EVAL_XMLINDEX_IX" ON "CROUTREACH"."EVAL"
          OBJECT_VALUE
        INDEXTYPE IS "XDB"."XMLINDEX" PARAMETERS
          'XMLTable eval_idx_tab_I XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/eval''
    COLUMNS
    eval_catt VARCHAR2(50) path ''@category'',
    acne_mbr_idd VARCHAR2(50) path ''@acmeMemberId'',
    eval_idd VARCHAR2(50) path ''@evalId'',
    eval_dtt TIMESTAMP WITH TIME ZONE path ''@eval_dt'',
    derivedFact XMLTYPE path ''derivedFacts/ns7:derivedFact'' virtual
    XMLTable eval_idx_tab_II XMLNamespaces(''http://www.cigna.com/acme/domains/derived/fact/2010/03'' AS "ns7",
    DEFAULT ''http://www.cigna.com/acme/domains/eval/2010/03''),''/ns7:derivedFact'' passing derivedFact
    COLUMNS
    defId VARCHAR2(50) path ''ns7:defId'',
    factSource VARCHAR2(50) path ''ns7:factSource'',
    origInferred_dt TIMESTAMP WITH TIME ZONE path ''ns7:origInferred_dt'',
    typee VARCHAR2(20) path ''ns7:factValue/ns7:type'',
    valuee VARCHAR2(1000) path ''ns7:factValue/ns7:value'',
    defUrn VARCHAR2(100) path ''ns7:defUrn'''
        PARALLEL 20 ;Wondering if anyone has run into xmlindex creation and populating problems similar to this, when scaling up from thousands of records to millions of records.
    At this point, for my work to be useful; must be able to get the xmlindex to at least successfully create and populate @ the 13.9 million records.
    Any suggestions, much appreciated.
    Regards,
    Rick Blanchard
    Edited by: RickBlanchardSRS on May 29, 2012 1:03 PM

    We didn't use "XMLDB XMLType partitioning" actually, but something simple like
    CREATE TABLE P_DATA
    (    "ID" NUMBER(15,0),
          "DOC" "SYS"."XMLTYPE"
    ) SEGMENT CREATION IMMEDIATE
    NOCOMPRESS NOLOGGING
    TABLESPACE "XML_DATA"
    XMLTYPE COLUMN "DOC" STORE AS SECUREFILE BINARY XML
    (TABLESPACE "XML_DATA"
      NOCOMPRESS  KEEP_DUPLICATES)
    XMLSCHEMA "http://www.xxxxx.com/schema_v3.0.xsd"
    ELEMENT "RECORD"
    DISALLOW NONSCHEMA
    PARTITION BY RANGE(ID)
    (PARTITION Q_DATA_PART_01 VALUES LESS THAN  (100000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_02 VALUES LESS THAN  (200000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_03 VALUES LESS THAN  (300000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_04 VALUES LESS THAN  (400000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_05 VALUES LESS THAN  (500000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_06 VALUES LESS THAN  (600000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_07 VALUES LESS THAN  (700000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_08 VALUES LESS THAN  (800000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_09 VALUES LESS THAN  (900000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_10 VALUES LESS THAN (1000000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_11 VALUES LESS THAN (1100000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_12 VALUES LESS THAN (1200000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_13 VALUES LESS THAN (1300000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_14 VALUES LESS THAN (1400000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_15 VALUES LESS THAN (1500000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_16 VALUES LESS THAN (1600000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_17 VALUES LESS THAN (1700000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_18 VALUES LESS THAN (1800000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_19 VALUES LESS THAN (1900000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_20 VALUES LESS THAN (2000000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_21 VALUES LESS THAN (2100000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_22 VALUES LESS THAN (2200000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_23 VALUES LESS THAN (2300000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_24 VALUES LESS THAN (2400000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_25 VALUES LESS THAN (2500000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_26 VALUES LESS THAN (2600000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_27 VALUES LESS THAN (2700000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_28 VALUES LESS THAN (2800000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_29 VALUES LESS THAN (2900000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_30 VALUES LESS THAN (3000000000) TABLESPACE "XML_DATA" NOCOMPRESS
    ,PARTITION Q_DATA_PART_MAX VALUES LESS THAN  (MAXVALUE) TABLESPACE "XML_DATA" NOCOMPRESS
    );Could be mistaken, but if I remember correctly we ended up with 10mill record id ranges. We needed to do this anyway (=using partitioning), otherwise we would have reached the maximum amount of records in a column physical limit (for our used db_block_size)
    Edited by: Marco Gralike on May 29, 2012 10:02 PM

  • Problems using mathml XML Schema in XMLDB

    I have successfully loaded the hierarchy of XML Schema definition documents for the current 'mathml' by adjusting the relative paths in all include and import statements, and by forcing the load to overcome cyclic dependency issues.
    However when I try to create a table using the XMLTYPE or register another schema which is dependent on mathml I receive the following error:
    ERROR at line 1:
    ORA-31079: unable to resolve reference to group "Content-expr.class"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 14
    Having tried loading into both 9iR2 and 10GR2 databases and pasting the document containing the 'Content-expr.class' into the parent document (i.e. removing the include) I have come to the conclusion that there is a problem with the schema definition.
    However being new to XML I do not know what ths issue is as the file containing the definition (math.xsd) is included well before the references in the parent document.
    Here is the group definition corresponding to the offending reference:
    <xs:group name="Content-expr.class">
    <xs:choice>
    <xs:group ref="ContExpr.class"/>
    <xs:group ref="PresExpr.class"/>
    </xs:choice>
    </xs:group>
    I am also unable to trace which reference is causing the problem as there are several.
    Does anyone have any suggestions as to what could be causing this issue, or how I can obtain further diagnostics?
    Any help much appreciated.
    Robert Honeyman
    *********** New info ***************
    OK. I have tried further to register the schema, and have the following additional information.
    I determined that I thought my problem was cyclic dependencies being resolved ONLY by virtue of the parent file mathml2.xsd. I therefore pasted all the files together in include order so that this was no longer an issue. I then performed the following actions:
    1. I tried to register into Oracle 9iR2 database (9.2.0.4) and received the following error:
    ERROR at line 1:
    ORA-31151: Cyclic definition encountered for group: "Content-expr.class"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 131
    ORA-06512: at line 14
    2. I then tried registering the schema into an Oracle 10G Release 2 database as well, and received the following error:
    ORA-31084: error while creating table "MEDLINE"."math729_TAB" for element
    "math"
    ORA-01792: maximum number of columns in a table or view is 1000
    ORA-02310: exceeded maximum number of allowable columns in table
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 14
    My conclusions are as follows:
    1. 9iR2 (the version I was using at least 9.2.0.4) can't handle cyclic dependencies at all, or at least not complex ones.
    2. Neither 9iR2 or 10gR2 can handle cyclic dependencies (or other dependent definitions managed purely by virtue of a parent file with multiple include statements)
    3. 10gR2 can handle cyclic dependencies when they are all defined in the same file or resolved by an explicit include regardless of complexity.
    4. 10gR2 cannot handle highly complex XML Schema definitions due its limit of 1000 columns per table.
    Does anyone have any comments on these conclusions?
    I don't even want to handle Mathml, just another schema definition that imports it. I may try to make my own adjustments.
    Message was edited by:
    rhoneyman
    null

    Thanks, I found the relevant sections in the XML DB 10GR2 documentation (chapter 3 I think). As far as I can tell my options are to either use one of the following:
    - top-down technique creating tables for sub elements in the schema definition
    - bottom-up technique collapsing some of the lower elements into CLOBs (I guess this is semi-structured storage)
    The problem with Mathml is that it seems quite complex, with only one global schema element and many nested elements, hence only one table is created by XMLDB and it logically follows that we run out of columns.
    To get it to work is likely to involve a fair amount of manual schema modification, which incurs a maintenance overhead for me.
    It would be good if Oracle could provide a way of simplifying this maintenance of complex schemas to get them to be registered. I guess this would be increasing the number of columns alllowed for a table or offering some other parametric option for DBMS_XMLSCHEMA.REGISTER_SCHEMA that allowed a threshold and either a top-down or bottom-up approach to be taken automatically.
    For the time being I am using a simplified schema that does not depend on Mathml for my storage needs.

  • Support for Creating Web Service from pl/sql package in JDeveloper 11

    We have been creating all of our web services from pl/sql packages in our Oracle database using JDeveloper 10.1.3.1. I understand that this capability is not supported in Jdev 11. We have been mandated to either move up to JDeveloper 11, or consider switching to eclipse, or even VS2008 and run .NET services from IIS. I have seen work-around solutions using TopLink and Jdev 11. Are there plans to revive this feature in the near future? We're now looking at switching to .NET since we could scrap our OAS instances and use IIS to publish web services. The only reason we were sticking with Oracle was the ease in converting all our existing package to web services with Jdev.
    Is anyone else in the same situation. If so, what solutions are you considering?

    Hi,
    there are a lot of option to make plsql web services .
    First you can stay with jdev 10.1.3
    Use the xmldb servlets
    use jdev 11g tp4 to create plsql ws and upgrade to jdev 11g production
    And I think in the next release of jdev it will be back , there are more options which disappeared like the adf bc sdo ws or jmx datacontrol etc.
    thanks Edwin

  • Logical Standby Database and XMLDB

    I couldn't find a proper group to post this message and thought I would try here.
    I want to set up a Logical Standby Database for our production database server 9.2.0.4.0 with XMLDB. I am having problem with some system tables that were created when I registered some XML schemas.
    These tables are in the standby database but Oracle complains the object does not exist.
    Any idea?

    >
    The "may be" is because I have tested flashback of a physical standby to before resetlogs, but not a logical standby.
    >
    A physical standby keeps the DBID of the primary - a logical standby does not. That is exactly the problem that restricts the reconversion into physical from logical, and you did not encounter that problem.
    >
    I haven't used "keep identity" but from what I read it relates to "convert to physical" not "flashback database".
    >
    Exactly. And that is what the OP wants to do: convert to physical (from logical).
    You mentioned that this might be possible with flashback.
    Problem: During the conversion from physical to logical, the DBID gets changed unless you specify (in 11g) KEEP IDENTITY. This would make it possible to reconvert into phyiscal from logical.
    In short: If there is no solution for the changed DBID of the logical standby in order to flashback it into physical as you suggested, then it is not possible .
    When I saw your first answer, I thought that you might have a solution in mind in order to solve that obvious problem. Sorry for having bothered you.
    Kind regards
    Uwe
    http://uhesse.wordpress.com

  • I am getting an error in 4.0.0.12 when trying to create a data miner workflow after db upgrade, any suggestions?

    java.sql.SQLException: ORA-20999: Error in WF_CREATE:
    ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [64131], [ORA-64131: XMLIndex Metadata: failure during the looking up of the dictionary
    ORA-30966: error detected in the XML Index layer
    ORA-31011: XML parsing failed
    ORA-06512: at "SYS.XMLTYPE", line 310
    ORA-06512: at "ODMRSYS.ODMR_WORKFLOW_SEC", line 198
    ORA-06512: at "ODMRSYS.ODMR_WORKFLOW_SEC", line 2039
    ORA-06512: at "ODMRSYS.ODMR_WORKFLOW", line 62
    ORA-06512: at "ODMRSYS.ODMR_WORKFLOW", line 72
    ORA-06512: at line 1
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
        at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1041)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
        at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3665)
        at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4739)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1352)
        at oracle.dmt.dataminer.generated.server.OdmrWorkflow.wfCreate(OdmrWorkflow.java:376)
        at oracle.dmt.dataminer.repository.Workflow.create(Workflow.java:364)
        at oracle.dmt.dataminer.wizard.workflow.WorkflowDialogState.finishCreate(WorkflowDialogState.java:96)
    Thanks

    Thanks for the quick response and as you stated it appears to be an issues with the XML schema for XMLDB.
    The db server instance is on an SLC host deployed by a DEV build:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    "CORE    11.2.0.1.0    Production"
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    I have tried both SQL Dev 3.2.20.09 and 4.0.0.12 on separate db hosts and in both case I had to modify the sqldev/dataminer/scripts/validateODMRSYS.sql so the upgrade would "validate" and finish. The cursor in validateODMRSYS.sql originally looked for "INVALID" objects and changes to it caused it to report all objecst invalid which calls RAISE_APPLICATION_ERROR(...) then fails to validate, see cursor snippet below. After correcting the cursor and running the upgrade upon double-click or ODM connection it is successful. I have multiple log files of the process if needed.
    DECLARE
    w_object_type varchar2(200);
    w_object_name varchar2(200);
    w_owner varchar2(200);
    w_status varchar2(50);
    countObjects integer := 0;
    --SELECT owner,
    --       object_type,
    --       object_name,
    --       status
    --FROM   dba_objects
    --WHERE  status = 'INVALID' AND
    --       owner = 'ODMRSYS'
    --ORDER BY owner, object_type, object_name
    cursor objects_cursor is
    SELECT owner,
           object_type,
           object_name,
           status
    FROM   dba_objects
    WHERE  --status = 'INVALID' AND
           owner = 'ODMRSYS'
    ORDER BY owner, object_type, object_name;
    Thanks!

  • Using DB Adapter with XMLDB and CLOB

    Hi,
    with oracle xmldb i can store XMLs in lob or structured storage (s. Oracle® XML DB Developer's Guide 10g Release 2 (10.2) B14259-02).
    Now my question:
    If want to use a database adapter in the ESB to wake up several BPELs. Is there a functionality how i can transform such a clob into a XML where i can use XSLTs?
    The db adapter does only map each column to one xml-tag...
    If i try to use a table with xmltype the creation of a database adapter fails with:
    "some tables contain columns that are not recognized by the database adapter, so they will captured as strings:
    sys_nc_rowinfo$(sys.xmltype)
    change teh type of the above columns to that of the closest supported type...."
    Message was edited by:
    HEWizard

    Hi,
    To get it working you have to create an AQ-table with payload type xmltype. The xmltype payload data type is available on rdbms 10g and up. If you are on 9i or lower use raw data type. Create a queue inside the AQ-table. I'm not quite sure what's the best scenario for you to the queue with data, but I would imagine that you could create a database trigger on the table you're talking about and enqueue the xml-data (payload) to the AQ-table. Thus using the AQ-table as a staging table for the ESB system.
    Next, create an ESB system using an AQAdapter to dequeue the queue (like you did using a DBAdapter). The adapter can handle both single-user and multi-consumer queue's and all data types (raw, xmltype and object types).
    Messages are dequeued generally within a second after you commited the transaction.
    Kind regards,
    H

  • Can't create XMLType based on OPAQUE in Java+JDBC

    Hi,
    I'm querying the database using Java and JDBC. The resulting column (there is only one) is of type SYS.XMLTYPE. When I want to create an object of class XMLType of the data in this column I'm getting an error in the orageneric.dll.
    The (partial) code I use is:
            OracleResultSetMetaData metaData = (OracleResultSetMetaData)rs.getMetaData();
            int columnCount = metaData.getColumnCount();
            if((columnCount==1) && (metaData.getColumnTypeName(1).equals("SYS.XMLTYPE"))) {
                System.out.println(metaData.getColumnClassName(1));
                XMLType xt = XMLType.createXML(rs.getOPAQUE(1));This is based on some example code in:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb11jav.htm
    When I run this I'm getting the following error:
    java.lang.UnsatisfiedLinkError: C:\app\tijink\product\11.1.0\client_2\BIN\orageneric11.dll: The specified procedure could not be found
            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
            at java.lang.Runtime.loadLibrary0(Runtime.java:823)
            at java.lang.System.loadLibrary(System.java:1030)
            at oracle.xdb.XMLType.getConnType(XMLType.java:3325)
            at oracle.xdb.XMLType.initConn(XMLType.java:3267)
            at oracle.xdb.XMLType.<init>(XMLType.java:1225)
            at oracle.xdb.XMLType.createXML(XMLType.java:698)I've tried a different version of getting the XMLType object:
                XMLType xml2 = (XMLType)rs.getObject(1);This is based on the example in the XMLDB forum FAQ (How do I access XMLType using JDBC ?
    This gives the following casting error:
    java.lang.ClassCastException: oracle.sql.OPAQUE cannot be cast to oracle.xdb.XMLTypeI'm a bit lost... any suggestion would be helpful

    Harald, also post this question on the java/xdk forum.
    A long time ago (2 / 3 years) while fiddling around with XSQL (from the XDK), trying to create XML webpages, I run into several OPAQUE issues as well and I was able to solve them via a lot of info on the java forum (but maybe a java enthousiast here can solve it / answer it anyway). Just a suggestion.
    Message was edited by:
    Marco Gralike

  • How to create simple XML database in oracle 11g

    Hi,
    what are the steps to followed to create a simeple custormer XML database.
    Like storing .xml file into XMLType, writing simple xml schema.....like that
    how to register the .xsd
    how to insert the xml data
    how to querying the the data base with xquery
    Thanks in Advance

    Have a look a the FAQ on the main page of this XMLDB forum. That's a good source to start (besides the XMLDB Developer Guide manual).

  • How to create index on a xmltype column stored as CLOB

    actually i have two problems.
    i uploaded this schemaA.xsd file into xmldb repository without problems. registration also went ok.
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    schemaURL => 'http://xmlns.example.com/xdb/documentation/schemaA.xsd'
    ,schemaDoc => sys.UriFactory.getUri('/home/dev/schemaA.xsd')
    ,local => TRUE
    ,genBean => false
    ,genTypes => TRUE
    ,genTables => false
    ,enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    END;
    then i run this:
    create table pf_table_a(
         id VARCHAR2(100) primary key,
         xsd VARCHAR2(3000),
    xml_document XMLType
    ) XMLTYPE COLUMN xml_document
    STORE AS CLOB
    XMLSCHEMA "http://xmlns.example.com/xdb/documentation/schemaA.xsd"
    ELEMENT "order";
    and got this error:
    SQL> @d:\usr\dev\perftest\create_tables.sql
    Table created.
    create table pf_table_a(
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    anyway the table was created. so i went on to create indexes.
    SQL> create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@or
    derNo'));
    create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@orderNo
    ERROR at line 1:
    ORA-04063: table "BAUSER1.PF_TABLE_A" has errors
    this of course is wrong. because the command is for creating index of a XMLTYPE table. no a column. but what is the correct command? thanks.
    jack.

    actually i have two problems.
    i uploaded this schemaA.xsd file into xmldb repository without problems. registration also went ok.
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    schemaURL => 'http://xmlns.example.com/xdb/documentation/schemaA.xsd'
    ,schemaDoc => sys.UriFactory.getUri('/home/dev/schemaA.xsd')
    ,local => TRUE
    ,genBean => false
    ,genTypes => TRUE
    ,genTables => false
    ,enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    END;
    then i run this:
    create table pf_table_a(
         id VARCHAR2(100) primary key,
         xsd VARCHAR2(3000),
    xml_document XMLType
    ) XMLTYPE COLUMN xml_document
    STORE AS CLOB
    XMLSCHEMA "http://xmlns.example.com/xdb/documentation/schemaA.xsd"
    ELEMENT "order";
    and got this error:
    SQL> @d:\usr\dev\perftest\create_tables.sql
    Table created.
    create table pf_table_a(
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    anyway the table was created. so i went on to create indexes.
    SQL> create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@or
    derNo'));
    create index pf_a_index on pf_table_a(extractValue(OBJECT_VALUE, '/order@orderNo
    ERROR at line 1:
    ORA-04063: table "BAUSER1.PF_TABLE_A" has errors
    this of course is wrong. because the command is for creating index of a XMLTYPE table. no a column. but what is the correct command? thanks.
    jack.

  • Memory problem when store xml into XMLDB from CLOB source

    Hi,
    We have performed a stress test and looped the following
    stored procedures for 1500 XML documents.
    We found the UGA and PGA memory for this oracle process increased tremendously.
    PGA memory
    ==========
    6MB -> 2.9GB
    UGA memory
    ==========
    5MB -> 2.8GB
    We have also experienced ORA-4030 error when more XML documents were inserted.
    The PGA & UGA memory would not ever be released. We have checked that
    the PGA & UGA memory for this process are still 2.9GB & 2.8GB the day after the stress test.
    Stored Procedure
    ================
    create or replace procedure clob_to_xml (indocid IN NUMBER) AS
    clobdoc clob := EMPTY_CLOB();
    myParser dbms_xmlparser.Parser;
    indomdoc dbms_xmldom.domdocument;
    xsltdomdoc dbms_xmldom.domdocument;
    xsl dbms_xslprocessor.stylesheet;
    outdomdocf dbms_xmldom.domdocumentfragment;
    outnode dbms_xmldom.domnode;
    outclobdoc clob := EMPTY_CLOB();
    proc dbms_xslprocessor.processor;
    xsltpath doc_types.canonical_doc_trim_xslt_name%type;
    xmltabname doc_types.xmldb_table_name%type;
    doc_type doc_types.doc_type%type;
    doc_type_version doc_types.doc_type_version%type;
    category doc_types.category%type;
    sqlstring varchar2(500);
    outxmldoc xmltype;
    begin
    -- clobdoc := :new.canonical_doc_content;
    begin
    select canonical_doc_content into clobdoc
    from canonical_doc
    where dttn_doc_id = indocid;
    exception
    when no_data_found then raise_application_error(-20001,'Doc ID ' || indocid || ' cannot be found');
    when others then raise;
    end;
    begin
    select dt.canonical_doc_trim_xslt_name, dt.xmldb_table_name, ddi.doc_type,ddi.doc_type_version, dt.category
    into xsltpath, xmltabname, doc_type, doc_type_version, category
    from
    dttn_doc_info ddi,
    doc_types dt
    where ddi.dttn_doc_id = indocid
    and ddi.doc_type = dt.doc_type
    and ddi.doc_type_version = dt.doc_type_version;
    exception
    when no_data_found then raise_application_error(-20001,'Doc Type is not defined');
    -- when others then raise;
    end;
    if (category <> 0 ) then
    --only support business document at this moment
    return;
    end if;
    if (xsltpath is null or xsltpath = '') then
    raise_application_error (-20001,'XSLT is not defined on doc_type table - ' || doc_type);
    end if;
    if (xmltabname is null or xmltabname = '') then
    raise_application_error (-20001,'XMLTable is not defined on doc_type table - ' || doc_type);
    end if;
    myParser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(myParser, clobdoc);
    indomdoc := dbms_xmlparser.getDocument(myParser);
    dbms_xmlparser.parseClob(myParser, xdbURIType(xsltpath).getClob());
    xsltdomdoc := dbms_xmlparser.getDocument(myParser);
    xsl := dbms_xslprocessor.newstylesheet(xsltdomdoc, '');
    proc := dbms_xslprocessor.newProcessor;
    --apply stylesheet to DOM document
    outdomdocf := dbms_xslprocessor.processxsl(proc, xsl, indomdoc);
    outnode := dbms_xmldom.makenode(outdomdocf);
    -- PL/SQL DOM API for XMLType can be used here
    dbms_lob.createTemporary(outclobdoc, true);
    dbms_xmldom.writeToClob(outnode, outclobdoc);
    begin
    sqlstring := 'INSERT INTO ' || xmltabname || ' values (:1, :2)';
    EXECUTE IMMEDIATE sqlstring USING indocid, outxmldoc;
    exception
    when others then
    begin
    rollback;
    raise_application_error (-20001,'Cannot insert into XMLDB , docid = ' || indocid);
    end;
    end;
    dbms_lob.freeTemporary(outclobdoc);
    DBMS_XMLDOM.freeDocument(indomdoc);
    DBMS_XMLDOM.freeDocument(xsltdomdoc);
    DBMS_XMLDOM.freeDocFrag(outdomdocf);
    DBMS_XMLPARSER.freeParser(myParser);
    DBMS_XSLPROCESSOR.freeProcessor(proc);
    end;
    Is there anything wrong with the Stored Procedure ?
    My oracle version is 10.1.0.4.
    Thanks & Regards,
    NM

    Mark,
    I think you missed it. OP gave you the version.
    My oracle version is 10.1.0.4.Rahul.

  • How can I read content from PDF file stored in Oracle 9i XMLDB

    Hi Friends:
    Now I have met one question that I don`t know how to read some String , for example "Hello", from the PDF file stored in the Oracle 9i XMLDB, I have stored that PDF file into the XMLDB now, any suggestions are appriciated . Thank you in advance.

    You may be able to do something with Oracle Text. The following shows how to get an HTML rendiditon of a binary document. I think you can also get plain text instead of HTML
    set echo on
    spool xfilesUtilties.log
    connect sys/&1 as sysdba
    grant ctxapp to &2
    connect &2/&3
    begin
      ctxsys.ctx_ddl.create_policy(policy_name=>'XFILES_HTML_GENERATION', filter=>'ctxsys.auto_filter');
    end;
    create or replace package xfiles_internal_11010
    authid definer
    as
      function renderAsHTML(sourceDoc BLOB) return CLOB;
    end;
    show errors
    create or replace package body xfiles_internal_11010
    as
    function renderAsHTML(sourceDoc BLOB)
    return CLOB
    as
      html_content CLOB;
    begin
      dbms_lob.createTemporary(html_content,true,DBMS_LOB.SESSION);
      ctx_doc.policy_filter(policy_name => 'XFILES_HTML_GENERATION',
                            document => sourceDoc,
                            restab => html_content,
                            plaintext => false);
      return html_content;
    end;
    end;
    show errors
    create or replace package xfiles_utilities_11010
    authid current_user
    as
      HOME_FOLDER   constant varchar2(700) := xdb_constants.HOME_FOLDER;
      PUBLIC_FOLDER constant varchar2(700) := xdb_constants.PUBLIC_FOLDER;
      function renderAsHTML(sourceFile VARCHAR2) return CLOB;
      function transformToHTML(xmldoc XMLType, xslPath VARCHAR2) return CLOB;
    end;
    show errors
    create or replace package body xfiles_utilities_11010
    as
    function renderAsHTML(sourceFile VARCHAR2)
    return CLOB
    as
    begin
      return xfiles_internal_11010.renderAsHTML(xdburitype(sourceFile).getBLOB());
    end;
    function transformToHTML(xmldoc XMLType, xslPath VARCHAR2)
    return CLOB
    as
      html clob;
    begin
      select xmldoc.transform(xdburitype(xslPath).getXML()).getClobVal()
        into HTML
        from dual;
      return html;
    end;
    end;
    show errors
    grant execute on xfiles_utilities_11010 to public
    create or replace public synonym xfiles_utilities for xfiles_utilities_11010
    quitMessage was edited by:
    mdrake

  • Create XML with PL/SQL

    Hi,
    What is the best way to create large XML in pl/sql?? and to read large XML from CLOB procedure parameter?????
    Thanks

    Use the internal XML-structures of the database, such as XMLType, XMLElement, XMLForrest. Have a look at the XMLDB-documentation.

Maybe you are looking for

  • Images in HTML forms and/or reports

    Hi, Apologies if a stupid question, but can you display a combination of data and image content in Portal HTML forms and/or reports? If so, how? This question assumes that the image in question is browser-supported (e.g. gif file), and the link to it

  • Need to reinstall system onTecra M3

    Due to a persistent Volume Bitmap error, I'm going to need to reinstall XP. (Reconditioned laptop => no recovery media & restore partition deleted). I need the install order for the drivers.  (I found the Toshiba Application installer in C:\TOSAPINS

  • Best Data Rate for Export to DVD as Quicktime Movie

    Hello - hope someone out there can help me!!! I put together a slideshow for my high school reunion using iMovie HD 5.0.2 and need help with settings exporting it as a Quicktime movie. *I want to export it to a DVD* so that I can play it on a friend'

  • Font not showing

    Hi everyone, I installed the CS4 Master collection last week on my computer. Today, I needed to open a page of my website on Flash, to create a new page and add some things, and FLA wouldn't recognize the font, telling me it wasn't in the system. Wel

  • Oracle Time and Labor time entry

    Hi, In Oracle Time and Labor on-line time entry (Timecard) screen I need to record end user's system's time as time-in and time-out i.e. user should not be able to modify the timing details. Can OTL possibly meet above requirement. An urgent response