Structured storage XMLType but disappointing performance

Hi,
This relates to Oracle 11g, but maybe the same question can be asked for 10g.
I'm having a lot of big XML files which are structured following this xsd:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema
   xmlns="http://localhost/public/xsd/simple.xsd"
   targetNamespace="http://localhost/public/xsd/simple.xsd"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns:xdb="http://xmlns.oracle.com/xdb"
   elementFormDefault="qualified"
   attributeFormDefault="unqualified"
   xdb:storeVarrayAsTable="true">
  <xs:element name="root" xdb:defaultTable="simple_or" xdb:maintainDOM="false">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="ea">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="eb" minOccurs="1" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="c1" type="xs:double" />
                    <xs:element name="c2" type="xs:double" />
                    <xs:element name="c3" type="xs:double" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
           </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>I create a VARRAY (the order is important) based structured storage table using the following commands:
declare
  l_bfile bfile;
  res boolean;
begin
  l_bfile := bfilename('EXDIR', 'simple.xsd');
  dbms_lob.open(l_bfile);
  dbms_xdb.deleteResource('/public/simple.xsd',4);
  res := dbms_xdb.createResource('/public/simple.xsd',l_bfile);
end;
BEGIN
  DBMS_XMLSchema.deleteSchema(
    schemaurl=>'http://localhost/public/xsd/simple.xsd',
    delete_option=>DBMS_XMLSchema.Delete_Cascade_Force);
END;
begin
   dbms_xmlschema.registerSchema(schemaurl => 'http://localhost/public/xsd/simple.xsd',
                                 schemadoc => xdbUriType('/public/simple.xsd').getXML(),
                                 local     => true,
                                 gentypes  => true,
                                 genbean   => false,
                                 gentables => true,
                                 force     => false,
                                 owner     => user);
end;
CREATE TABLE simple_or_1 OF XMLType
  XMLSCHEMA "http://localhost/public/xsd/simple.xsd"
  ELEMENT "root"
  VARRAY "XMLDATA"."ea"."eb"
    STORE AS TABLE simple_nested1
        ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)))
/And I load some XML files of the following form:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="http://localhost/public/xsd/simple.xsd">
<ea>
<eb>
<c1>4.0</c1>
<c2>5.0</c2>
<c3>6.0</c3>
</eb>
<eb>
<c1>7.0</c1>
<c2>8.0</c2>
<c3>9.0</c3>
</eb>
<eb>
<c1>7.0</c1>
... etc ...
</ea>
</root>
Every document has about 50.000 <eb> elements and I loaded 6 sample documents.
A simple query like the following takes about 5 minutes:
SELECT XMLQuery('
  declare default element namespace "http://localhost/public/xsd/simple.xsd"; (: :)
  for $i in /root
  return max($i/a/b/c2)
' PASSING OBJECT_VALUE RETURNING CONTENT)
FROM simple_or_1;The explain plan shows the following:
| Id  | Operation                    | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT             |                |     6 |    60 |     3   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE              |                |     1 |  1901 |            |          |
|*  2 |   TABLE ACCESS BY INDEX ROWID| SIMPLE_NESTED1 |  1969 |  3655K|     6   (0)| 00:00:01 |
|*  3 |    INDEX RANGE SCAN          | SYS_C009750    |   787 |       |     2   (0)| 00:00:01 |
|   4 |  SORT AGGREGATE              |                |     1 |       |            |          |
|   5 |   FAST DUAL                  |                |     1 |       |     2   (0)| 00:00:01 |
|   6 |  TABLE ACCESS FULL           | SIMPLE_OR_1    |     6 |    60 |     3   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter(SYS_XMLCONV("SYS_ALIAS_2"."SYS_XDBPD$",0,32,'3952ABE048DCF8D6E040007F0101
              7EA4',1,5561,1) IS NOT NULL)
   3 - access("NESTED_TABLE_ID"=:B1)I'm not understanding the low performance of 5 minutes... is there anyone who can explain and help out?

Note with DOM Fidelity disabled on all types the SYS_XMLCONV is replaced with the more efficeint SYS_XMLGEN. However this is still not as efficient as the XMLTable approach..
C:\Documents and Settings\Mark D Drake>sqlplus sys/oracle as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Sep 7 06:03:39 2007
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Beta
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> connect / as sysdba
Connected.
SQL> --
SQL> drop user Tijink cascade
  2  /
drop user Tijink cascade
ERROR at line 1:
ORA-01918: user 'TIJINK' does not exist
SQL> grant connect, resource, alter session, create view to Tijink  identified by  Tijink
  2  /
Grant succeeded.
SQL> conn Tijink/Tijink
Connected.
SQL> --
SQL> set long 10000000
SQL> set pages 5000
SQL> var schemaPath varchar2(256)
SQL> var schemaURL  varchar2(256)
SQL> var xmlSchema  clob;
SQL> --
SQL> begin
  2     :schemaURL := 'http://localhost/public/xsd/simple.xsd';
  3     :schemaPath := '/public/simple.xsd';
  4     :xmlSchema :=
  5  '<?xml version="1.0" encoding="ISO-8859-1"?>
  6  <xs:schema
  7     xmlns="http://localhost/public/xsd/simple.xsd"
  8     targetNamespace="http://localhost/public/xsd/simple.xsd"
  9     xmlns:xs="http://www.w3.org/2001/XMLSchema"
10     xmlns:xdb="http://xmlns.oracle.com/xdb"
11     elementFormDefault="qualified"
12     attributeFormDefault="unqualified"
13     xdb:storeVarrayAsTable="true">
14    <xs:element name="root" xdb:defaultTable="simple_or">
15      <xs:complexType xdb:maintainDOM="false">
16        <xs:sequence>
17          <xs:element name="ea">
18            <xs:complexType xdb:maintainDOM="false">
19              <xs:sequence>
20                <xs:element name="eb" minOccurs="1" maxOccurs="unbounded">
21                  <xs:complexType xdb:maintainDOM="false">
22                    <xs:sequence>
23                      <xs:element name="c1" type="xs:double" />
24                      <xs:element name="c2" type="xs:double" />
25                      <xs:element name="c3" type="xs:double" />
26                    </xs:sequence>
27                  </xs:complexType>
28                </xs:element>
29              </xs:sequence>
30             </xs:complexType>
31          </xs:element>
32        </xs:sequence>
33      </xs:complexType>
34    </xs:element>
35  </xs:schema>';
36  end;
37  /
PL/SQL procedure successfully completed.
SQL> alter session set events='31098 trace name context forever'
  2  /
Session altered.
SQL> DECLARE
  2    BINARY_XML boolean:=FALSE;
  3  BEGIN
  4     IF (BINARY_XML)
  5     THEN
  6        dbms_xmlschema.registerSchema(SCHEMAURL => :schemaURL,
  7                                      SCHEMADOC => :xmlschema,
  8                                      LOCAL     => TRUE,
  9                                      GENTYPES  => FALSE,
10                                      GENBEAN   => FALSE,
11                                      GENTABLES => FALSE,
12                                      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE,
13                                      FORCE     => FALSE,
14                                      OPTIONS   => DBMS_XMLSCHEMA.REGISTER_BINARYXML,
15                                      OWNER     => USER);
16     ELSE
17        dbms_xmlschema.registerSchema(SCHEMAURL => :schemaURL,
18                                      SCHEMADOC => :xmlSchema,
19                                      LOCAL     => TRUE,
20                                      GENTYPES  => TRUE,
21                                      GENBEAN   => FALSE,
22                                      GENTABLES => TRUE,
23                                      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE,
24                                      FORCE     => FALSE,
25                                      OWNER     => USER);
26     END IF;
27  END;
28  /
PL/SQL procedure successfully completed.
SQL> --
SQL> set timing on
SQL> set long 1000000
SQL> set pages 50000
SQL> set lines 200
SQL> --
SQL> call  dbms_stats.GATHER_SCHEMA_STATS('TIJINK')
  2  /
Call completed.
Elapsed: 00:00:01.67
SQL> set autotrace on explain
SQL> --
SQL> SELECT XMLQuery
  2         ('
  3      declare default element namespace "http://localhost/public/xsd/simple.xsd"; (: :)
  4      for $i in /root
  5      return max($i/ea/eb/c2)
  6      ' PASSING OBJECT_VALUE RETURNING CONTENT)
  7    FROM "simple_or"
  8  /
no rows selected
Elapsed: 00:00:00.28
Execution Plan
Plan hash value: 3716725992
| Id  | Operation                    | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT             |                                |     1 |    10 |     2   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE              |                                |     1 |    23 |            |       |
|*  2 |   TABLE ACCESS BY INDEX ROWID| SYS_NTobq/uFrTQGaOrq3BeDy9Eg== |     1 |    23 |     0   (0)| 00:00:01 |
|*  3 |    INDEX RANGE SCAN          | SYS_C009648                    |     1 |       |     0   (0)| 00:00:01 |
|   4 |  SORT AGGREGATE              |                                |     1 |       |            |       |
|   5 |   FAST DUAL                  |                                |     1 |       |     2   (0)| 00:00:01 |
|   6 |  TABLE ACCESS FULL           | simple_or                      |     1 |    10 |     2   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   2 - filter(SYS_XMLGEN(TO_CHAR("SYS_ALIAS_1"."c2")) IS NOT NULL)
   3 - access("NESTED_TABLE_ID"=:B1)
SQL> select max(c2)
  2    from "simple_or",
  3         xmltable
  4         (
  5           xmlnamespaces
  6           (
  7              default 'http://localhost/public/xsd/simple.xsd'
  8           ),
  9           '/root/ea/eb'
10           passing OBJECT_VALUE
11           columns
12           C2 PATH 'c2'
13         )
14  /
   MAX(C2)
Elapsed: 00:00:00.15
Execution Plan
Plan hash value: 1041340395
| Id  | Operation                     | Name                           | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | SELECT STATEMENT              |                                |     1 |    33 |     0   (0)| 00:00:01 |
|   1 |  SORT AGGREGATE               |                                |     1 |    33 |            |          |
|   2 |   NESTED LOOPS                |                                |       |       |            |          |
|   3 |    NESTED LOOPS               |                                |     1 |    33 |     0   (0)| 00:00:01 |
|   4 |     INDEX FULL SCAN           | SYS_C009649                    |     1 |    10 |     0   (0)| 00:00:01 |
|*  5 |     INDEX RANGE SCAN          | SYS_C009648                    |     1 |       |     0   (0)| 00:00:01 |
|   6 |    TABLE ACCESS BY INDEX ROWID| SYS_NTobq/uFrTQGaOrq3BeDy9Eg== |     1 |    23 |     0   (0)| 00:00:01 |
Predicate Information (identified by operation id):
   5 - access("NESTED_TABLE_ID"="simple_or"."SYS_NC0000700008$")
SQL> desc "simple_or"
Name                                                                                                      Null?    Type
TABLE of SYS.XMLTYPE(XMLSchema "http://localhost/public/xsd/simple.xsd" Element "root") STORAGE Object-relational TYPE "root648_T"
SQL> desc "root648_T"
Name                                                                                                      Null?    Type
ea                                                                                                                 ea649_T
SQL> desc "ea649_T"
Name                                                                                                      Null?    Type
eb                                                                                                                 eb651_COLL
SQL> desc "eb651_COLL"
"eb651_COLL" VARRAY(2147483647) OF eb650_T
Name                                                                                                      Null?    Type
c1                                                                                                                 NUMBER
c2                                                                                                                 NUMBER
c3                                                                                                                 NUMBER
SQL>

Similar Messages

  • Query about XMLTYPE column structured storage in Oracle Xml db

    Dear All,
    DB Version: Oracle 11g (11.2.0.3.0)
    I have an table having one column as XMLTYPE with Structured storage.
    CREATE TABLE Orders
        Order_id NUMBER NOT NULL,
        Order_etc VARCHAR2(100),
        Order_desc XMLType NOT NULL
        XMLTYPE Order_desc STORE AS OBJECT RELATIONAL XMLSCHEMA  "http://localhost/public/xsd/order_desc_xsd.xsd" ELEMENT "OrderState";
    I have then registered the XSD with XML Db schema which is required for Structured storage.
    Before this table creation I had created a table (db_objects) of XMLTYPE and was able to use the below query to check for what all objects the XMLTYPE table got broken into when I registered its XSD.
        SELECT column_name,     
               data_type
        FROM   user_tab_cols
        WHERE  table_name = 'DB_OBJECTS';
    And used below query to look for data stored in Object-Relational structure for my table (DB_OBJECTS) created with XMLTYPE definition.
      SELECT EXTRACTVALUE(xseq.column_value, '/THISROW/OWNER')       AS owner
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_NAME') AS object_name
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_TYPE') AS object_type
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/OBJECT_ID')   AS object_id
        ,      EXTRACTVALUE(xseq.column_value, '/THISROW/CREATED')     AS created
        FROM   db_objects do
         ,      TABLE(XMLSEQUENCE(EXTRACT(VALUE(do), '/ROWSET/THISROW'))) xseq 
        WHERE  ROWNUM <= 10;
    Now could someone let me know, how to find how the column (Order_desc) of XMLTYPE was broken down into further objects just like I did for the Table with XMLTYPE (as shown above)?
    Many Thanks.

    First given that you are on 11.2, ExtractValue is deprecated and the documentation lists three options to use instead.  Here is one option (untested)
    SELECT owner, object_name, object_type, object_id, created
      FROM db_objects do,
           XMLTable('/ROWSET/THISROW'
                    PASSING do.object_value
                    COLUMNS
                    -- Set data types accordingly
                    owner        VARCHAR2(20) PATH 'owner',
                    object_name  VARCHAR2(20) PATH 'object_name',
                    object_type  VARCHAR2(20) PATH 'object_type',
                    object_id    VARCHAR2(20) PATH 'object_id',
                    created      VARCHAR2(20) PATH 'created');
    Second, why does column order matter?  You are storing in an object relational method.  As long as the XML is valid per the schema, the Oracle will be able to store the data and later retrieve it as well.  How that data is stored is mostly Oracle internals and should not be touched as it can be changed from version to version.  You can use schema annotation to control how Oracle maps and stores the XML, but nothing in there specifies column order that I am aware of.
    It seems additional details are missing as to what you need the information for so that would help others answer your question.

  • JDBC XMLType Insert/Update Performance

    I am writing a backend Java EE application that inserts or updates XML documents into a table backed by XMLType.  I'm using Oracle 11.2.0.3 with associated drivers and XDK, with connections obtained from an oracle.jdbc.poo.OracleDataSource.  Unfortunately, I can't get my application to perform faster than 7 transactions a second, with or without JDBC batching.  I've tried several different table structures; here are the two that have shown the most promise:
    CREATE TABLE mrbook_raw
      id  RAW(16),
      created_date TIMESTAMP,
      last_modified_ts TIMESTAMP,
      bk_typ_cd VARCHAR2(16),
      bk_invt XMLType,
      PRIMARY KEY(id),
      FOREIGN KEY (id) REFERENCES mrbook(id)
    ) XMLTYPE COLUMN bk_invt ELEMENT "http://www.mrbook.com/BookData/Vers1#BK_INVT";
    --Also tried the below...
    CREATE TABLE book_master OF XMLTYPE
    XMLTYPE STORE AS SECUREFILE BINARY XML
    VIRTUAL COLUMNS
      isbn_nbr AS ( XmlCast(
                    XmlQuery('declare namespace plh="http://www.mrbook.com/BookData/Vers1/Header";
                              declare namespace bk_invt="www.mrbook.com/BookData/Vers1/InventoryData";
                              /bk_invt:BK_INVT/plh:HDR/plh:ISBN_NBR'
                              PASSING object_value RETURNING CONTENT) AS VARCHAR2(64)) ),
      book_id AS ( XmlCast(
                    XmlQuery('declare namespace plh="http://www.mrbook.com/BookData/Vers1/Header";
                              declare namespace invtdata="http://www.mrbook.com/BookData/Vers1/InventoryData";
                              /bk_invt:BK_INVT/plh:HDR/plh:BOOK_ID'
                              PASSING object_value RETURNING CONTENT) AS VARCHAR2(64)) )
    Here is the code that inserts into the first table:
        private static final String INS_MRBOOK_RAW =
                "INSERT INTO MRBOOK_RAW " +
                        "(id, bk_invt, last_modified_ts, created_date) " +
                "VALUES (?, ?, ?, ?)";
        private static final String UPD_MRBOOK_RAW =
                "UPDATE MRBOOK_RAW " +
                "SET " +
                    "bk_invt = ?, " +
                    "last_modified_ts = ? " +
                "WHERE id = ?";
    protected void updateBookRaw(BookRecord record, Connection con)
            PreparedStatement stmt = null;
            SQLXML sqlxml = null;
            Timestamp now = new Timestamp(System.currentTimeMillis());
            try
                stmt = con.prepareStatement(UPD_MRBOOK_RAW);
                sqlxml = con.createSQLXML();
                DOMResult result = sqlxml.setResult(DOMResult.class);
                result.setNode(record.getExistingInvtData());
                stmt.setSQLXML(1, sqlxml);
                stmt.setTimestamp(2, now);
                stmt.setBytes(3, record.getId());
                stmt.executeUpdate();
            catch(SQLException e)
                throw new RuntimeException(e);
            finally
                if(sqlxml != null)
                    try
                        sqlxml.free();
                    catch(SQLException e)
                        log.error("Unable to free SQLXML!", e);
                if(stmt != null)
                    try
                        stmt.close();
                    catch(SQLException e)
                        log.error("Unable to close statement!", e);
        protected void insertBookRaw(BookRecord record, Connection con)
            PreparedStatement stmt = null;
            SQLXML sqlxml = null;
            Timestamp now = new Timestamp(System.currentTimeMillis());
            XMLDocument bookDoc = parser.getInvtDataDoc(record.getNewBook());
            try
                stmt = con.prepareStatement(INS_MRBOOK_RAW);
                sqlxml = con.createSQLXML();
                DOMResult domResult = sqlxml.setResult(DOMResult.class);
                domResult.setNode(bookDoc);
                stmt.setBytes(1, record.getId());
                stmt.setSQLXML(2, sqlxml);
                stmt.setTimestamp(3, now);
                stmt.setTimestamp(4, now);
                stmt.executeUpdate();
            catch(SQLException e)
                throw new RuntimeException(e);
            finally
                if(sqlxml != null)
                    try
                        sqlxml.free();
                    catch(SQLException e)
                        log.error("Unable to free SQLXML object!", e);
                if(stmt != null)
                    try
                        stmt.close();
                    catch(SQLException e)
                        log.error("Unable to close statement!", e);
    I've tried every storage method possible; CLOBs, Binary XMLType, and structured storage, but I just cannot get the application to go faster than 7 records/second.
    I understand that this may or may not be an XMLType question, but I don't know where to start.  From everything above, it looks like I should be getting good performance inserting and updating XMLType records; and I do indeed get pretty good performance from retrieval, but not from insert or update.  Does anyone have any suggestions on what I might try or a reference I might look at to start?

    Perhaps a more specific question... should I use PreparedStatements with SQLXML or should I use the OracleXMLSave class?  Are SQLXML types batchable under Oracle?

  • Piecewise Insert into structured storage

    I understand that XMLUPDATE can handle piecewise update, but what do I do for piecewise insert. I want to add a sub-tree (document fragment) conformant with the registered schema to the xml document, without re-writing the whole (possibly very, very large and growing) document, and retaining all the power and abstraction of structured storage.
    It would be nice to get an XMLType via an XPath select, get the DOM object from the XMLTYpe, operate on the DOM, and see those changes reflected in the database. I can do all that, but the changes to the DOM seem to be in-memory only.
    How do I add a sub-node to an existing structured document?
    Thanks,
    David

    HI,
    Oracle version is 11.1.0.7.0.
    Metalink found three bugs related to the error ORA-00600: Interner Fehlercode, Argumente: [qmxConvUnkType], [], [], [], [],
    The bugs are:
    BUG 8644684 ORA-600 [QMXCONVUNKTYPE] DURING INSERT INTO SCHEMA-BASED TABLE
    BUG 8671408 INSERT OF XML DOC INTO AN XML SCHEMA STORED AS BINARY XML FAILS WITH ORA-30937
    BUG 8683472 SCHEMA EXECUTABLE RETURNS INCORRECT ERRORS DURING VALIDATION AGAINST XML SCHEMA
    Well, I have to look round in XML DB Forum yet.

  • Storing data in structured storage

    I see everywhere that storing data in stuctured storage way is the better thing to do if we want to make fast search.
    But how can I do it.
    I only see that the default storage is clob for xmltype and we also can say "stored as clob" but how do it for store it in structured storage.
    Thank you.

    You need to register an XML Schema that defines your data. You then define the type of data your XML columns will contain using XMLSCHEMA and ELEMENT clauses..
    See the XML DB demo for more info

  • Structured Storage

    I have a very simple schema registered called "Books.xsd" with a targetNamespace. This generated the user_xml_table Books4576_TAB.
    I've also created a table BOOKS with an XMLType column and can successfully insert an XML file with a schemaLocation with the targetNamespace and Books.xsd.
    A select from the BOOKS table's XMLType column yields a CLOB of XML. However, a select of the Books4576_TAB table yields no rows. I don't think structured storage is being successfully applied on my insert and the default table is not being populated.
    If I am using structured storage correctly, should the relational tables generated by the register schema command be populated when I perform an insert?

    No, you have LOB based storage for the table you created....
    You need to look at the DDL for the table generated using register Schema and then modify that DDL to create the relational table with the XMLType column. You need to understand that the storeVarrayAsTable directive only applies to the table generated by registerSchema, not to any XMLType tables or columns that are created after the XML Schema is registered.

  • Importing native xml in to semi structured storage

    hello,
    how store the a bibliographic data in the native xml and import or export that data into to the semi structured storage. What are the ways we query the xml database.
    Eagerly waiting for the reply
    Cheers
    Akhil
    Thank you in advance

    Based on a small extension demo-ed in : http://www.liberidu.com/blog/?p=1053 (demo script demo06.sql)
    -- If you can select it you can insert it...
    -- drop table OGH_xml_store purge;
    create table OGH_xml_store of xmltype
    xmltype store as binary xml
    commit;
    exec get_dir_list( 'G:\OGH\xmlstore' );
    set time on timing on
    insert into OGH_xml_store
    select XMLTYPE(bfilename('OGH_USE_CASE',dl.filename),NLS_CHARSET_ID('AL32UTF8')) AS "XML"
    from   dir_list dl
    where  dl.filename like '%.xml';
    set time off timing off
    commit;
    select count(*) from OGH_xml_store;
    prompt pause
    pause
    clear screen
    -- If you can select it you can create resources and files
    set time on timing on
    commit;
    exec get_dir_list( 'G:\OGH\xmlstore' );
    select count(*) from dir_list where filename like '%.xml';
    set serveroutput on size 10000
    DECLARE
      XMLdoc       XMLType;
      res          BOOLEAN;
      v_foldername varchar2(4000) := '/public/OGH/';
      cursor c1
      is
      select dl.filename                                                                  FNAME
      ,      XMLTYPE(bfilename('OGH_USE_CASE',dl.filename),NLS_CHARSET_ID('AL32UTF8')) XMLCONTENT
      from   dir_list dl
      where  dl.filename like '%.xml'
      and rownum <= 100;
    BEGIN
    -- Create XDB repository Folder
    if (dbms_xdb.existsResource(v_foldername))
    then
           dbms_xdb.deleteResource(v_foldername,dbms_xdb.DELETE_RECURSIVE_FORCE);
    end if;
    res:=DBMS_XDB.createFolder(v_foldername);
    -- Create XML files in the XDB Repository
    for r1 in c1
    loop
       if (DBMS_XDB.CREATERESOURCE(v_foldername||r1.fname, r1.xmlcontent))
       then
          dbms_output.put_line(v_foldername||r1.fname);
          null;
       else
          dbms_output.put_line('Loop Exception :'||sqlerrm);
       end if;
    end loop;
    EXCEPTION WHEN OTHERS THEN
      dbms_output.put_line('Others Exception: '||sqlerrm);
    END;
    set time off timing off
    commit;
    prompt pause
    pause
    clear screen
    -- FTP and HTTP
    clear screen
    prompt
    prompt *** FTP - Demo ***
    prompt
    prompt pause
    pause
    host ftp
    -- open localhost 2100
    -- user OGH OGH
    -- cd public
    -- cd OGH
    -- ls
    -- bye
    clear screen
    prompt
    prompt *** Microsoft Internet Explorer - Demo ***
    prompt
    prompt pause
    pause
    host "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://OGH:OGH@localhost:8080/public/OGH/
    prompt pause
    pause
    -- Accessing the XDB Repository content via Resource View
    -- Selecting content from a resource via XBDUriType
    clear screen
    prompt set long 300
    set long 300
    prompt Relative Path - (path)
    SELECT path(1) as filename
    FROM RESOURCE_VIEW
    WHERE under_path(RES, '/public/OGH', 1) = 1
    and rownum <= 10
    prompt pause
    pause
    clear screen
    prompt Absolute Path - (any_path)
    select xdburitype(any_path).getClob() as xml
    FROM RESOURCE_VIEW
    WHERE under_path(RES, '/public/OGH', 1) = 1
    and rownum <= 1;
    prompt pause
    pause

  • Any idea to make something similar as Ms Structured Storage in Labview?

    I read about Ms COM based Structured storage. Are there any idea to make something similar in Labview, or call some external component to make that functions?

    COM is from Component Object Model and the structured storage(SS) is based on it. Shortly SS is a file system within a file with two kind of objects: storage=>directory and stream=>file and COM defines how to treat that objects in a single file system. Some of the features are: simultaneous access to objects (or part of) from multiple applications, direct or transacted access and so on. In direct access the changes are made immediately, in transacted they are buffered and committed or reverted. There are some functions in OLE32.dll but the question is how to implement the full functionality of SS and call it from LV, may be in another dll...

  • Loading XML Document into Structured Storage

    HI Everybody,
    I am confronted with a BUG in Oracle which is being fixed but will last a long time. I have a relatively complex Schema with manifold includes, imports and inheritances which I can register successfully. The object-relational table is also generated. But loading the instance document with INSERT INTO... fails due to severe internal error. I have not yet tried SQL*Loader, however.
    Please, does anyone know a safe alternative method to parse and load? Structured storage is mandatory because I need to retrieve individual elements and attributes. Instance documents are big, ca. 20 MB.
    Thanks, regards
    Miklos HERBOLY

    HI,
    Oracle version is 11.1.0.7.0.
    Metalink found three bugs related to the error ORA-00600: Interner Fehlercode, Argumente: [qmxConvUnkType], [], [], [], [],
    The bugs are:
    BUG 8644684 ORA-600 [QMXCONVUNKTYPE] DURING INSERT INTO SCHEMA-BASED TABLE
    BUG 8671408 INSERT OF XML DOC INTO AN XML SCHEMA STORED AS BINARY XML FAILS WITH ORA-30937
    BUG 8683472 SCHEMA EXECUTABLE RETURNS INCORRECT ERRORS DURING VALIDATION AGAINST XML SCHEMA
    Well, I have to look round in XML DB Forum yet.

  • I update my iCloud storage today but I paid with my wife's credit card and now anytime that I sended an email appears the name of her instead of mine to all my contacts ??? how can I change and put my name in my emails ??

    hi please I need help , I paid with my wifes credit card the upgrade in my icloud storage today but now any time I send an email appears ....from: my wifes name instead of my name ....how can I change this ,thank you

    You might want to make sure your credit card is listed in the billing information associated with your Apple ID (see http://support.apple.com/kb/ht1918).
    Also, to change the From name that appears when you address emails on and iOS device, go to Settings>Mail,Contacts,Calendars...tap your iCloud email account, tap you iCloud account at the top, tap Mail at the bottom, then enter the name you want to use in the Name field at the top.
    To change the From name on your Mac Mail, go to icloud.com, sign into your account, open Mail, click the gear shaped icon on the bottom left and choose Preferences, go to the Accounts tab and enter the name you want to use in the Full Name field and click Done.  Then quit Mail on your Mac and re-open it.  Your new From name should now appear in the drop-down list when you compose a new email.

  • HT201250 how do I disable time machine? I want to use my external drive as additional storage. But it mirrors everything I edit. If I remove a document, it removes it from the external drive as well.

    how do I disable time machine? I want to use my external drive as additional storage. But it mirrors everything I edit. If I remove a document, it removes it from the external drive as well.
    I purchased a 1 TB WD passport drive, formatted for Mac. I set it up originally (mistakenly) to backup time machine. I went back and set it to "do not backup"  It still backs up evey document I edit. If I add a document when the drive is disconnected, it automatically adds it to the external drive the next time connect to the passport drive. If I remove a document the same thing happens.
    I need additional storage to free up space on my laptop hard drive. This is not working the way I want it to. Help!

    Do not backup your startup volume to another partition on the same drive. If the drive fails you have nothing. Always backup to another drive or volume on another drive.
    The I/O error usually means there's a problem with the drive. Clone ASAP, then repartition and reformat the main drive. Then restore the clone. Here's the basic process:
    You will have to backup your OS X partition to an external drive, boot from the external drive, use Disk Utility to repartition and reformat your hard drive back to a single volume, then restore your backup to the internal hard drive.
    Get an empty external hard drive and clone your internal drive to the external one.
    Boot from the external hard drive.
    Erase the internal hard drive.
    Restore the external clone to the internal hard drive.
    Clone the internal drive to the external drive
    Open Disk Utility from the Utilities folder.
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Check the box labeled Erase destination.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.
    Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears.  Select the icon for the external drive and click on the downward pointing arrow button.
    After startup do the following:
    Erase internal hard drive
    Open Disk Utility in your Utilities folder.
    After DU loads select your internal hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.  Do not quit Disk Utility.
    Restore the clone to the internal hard drive
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Check the box labeled Erase destination.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the internal hard drive. Source means the external startup drive.
    Note that the Source and Destination drives are swapped for this last procedure.

  • Photoshop CS2 opens but wont perform any task (open jpgs, create new jpgs etc). Other CS2 progs such as indesign are fine. MAC shop, couldn't fix, said I should ty install op system 4 Powerbook G4-dont have discs- can I get them?other solution? OS 10.4.11

    Photoshop CS2 opens but wont perform any task (open jpgs, create new jpgs etc). Other CS2 progs such as indesign are fine. MAC shop, couldn't fix, said I should try install op system 4 Powerbook G4-dont have discs- can I get them? or other solution? Am using OS 10.4.11 Thanks for any help

    Hi
    I actually dont think its Lion (sorry i put that as couldn't remember) as not on that computer at the moment, its at home, I am at work. I know CS2 is compatable with whatever OS I am using because I can using CS2 indesign etc and I was able to use CS2 photoshop until I updated the Camino browser (I believe this is when it stopped working). I have CS5 but it wont work at all on my Powerbook G4.
    I can send a message later with the OS I am using and maybe you can suggest other help? They told me in the MAC shop to try and get the installation discs. They also said I would be able to get these via Apple's 'media replacement programme' which I cannot find anyway! To be honest, I am not even sure getting the install discs will work but I'll try whatever I need to try and get Photoshop working on it again!
    Thanks

  • I'm trying to update my iPad but it says I don't have enough available storage. But I have more than enough can anyone tell me what the problem is?

    I'm trying to update my iPad but it says I don't have enough available storage. But I have more than enough can anyone tell me what the problem is?

    Well, we can't as we don't know what you consider as "more than enough". The built is quite heavy (like it can be 800mb) then it needs to be extracted to be installed before everything unneeded gets deleted...

  • TS4009 How do I get a full uk refund for additional storage bought but realized not needed?

    How do I get a full uk refund for additional storage bought but realized not needed?
    All I wanted to do was upgrade my ipad 2 to ios 6 but in my settings it was greyed out and it told me I did not have enough storage to upgrade so I bought additional icloud storage and realised that this made no difference whatsoever
    Now I was a refund but typical apple, one click to buy but a million and a phone call to get back
    I just want this iPad upgraded and my refund for storage that aint storage!?? and someone to explain to me in LAYMAN's terms what the difference is between iPad storage and iCloud and what is the point if you cannot upgrade even though you bought more storage!?
    Thank you

    iCloud: Photo Stream troubleshooting - Support - Apple
    Use instructions to downgrade your storage.
    difference in laymans terms is simple. You ipad has local storage. Icloud is storage on apple server, that people by to create backup. Local storage for ipad can not be expanded. New ipad with bigger storage can be purchased and Apple makes them is up to 128 gigs size.

  • My ipod screen shows not enough storage message but it will not let me close or go to settings.  How do I get this message off to get to my settings to get to the icloud setting?

    My ipod screen shows "not enough storage" message but will not let me click on the cancel or settings button.  How do I fix this?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                 
    iOS: How to back up           
    - Restore to factory settings/new iOS device.

Maybe you are looking for

  • Import po jsec ,jecv,jadc is not flowing in excise capturing.

    Hi guru's i have an import po scenario. I have done invoice verification for import po for all cvd, cess ,secc and additional custom duty. during migo in excise tab only cvd condition is showing in bed but rest conditions are not flowing like jsec ,j

  • Texting Verizon's Roadside Service

    Why is it I can text the whole world but I can't text Verizon's road side service I lost my voice in 2008 due to cancer of the larynx so I am mute last time I had a break down I had to have a stranger call for me Why can't Verizon offer texting for t

  • Deployment Error in OAM Console

    Hi team,      I installed the oracle weblogic server 10.3.6,oracle access management 11g and also i create the rcu.After i starting the admin server and oam server all the applications are deployed successully but oamconsole application status is sho

  • Applescript, iMovie and Automator problem

    Hi, Sorry for reposting from another area, but maybe this will fair better in the right section. I'm trying to convert a .mov file to .mp4 using Visualhub and automator, but a step in my automator file uses an applescript step that just causes the au

  • Restore itune on my ipod touch

    i eased me itune on my ipod and now im trying restore it on my ipod touch again