7 Comments

  1. Robbie Vanhove
    8/5/2008

    Hi Marco,

    I tried to implement this solution, but can not execute the xmlquery function like this. My xquery is saved in the ‘/public’ folder in the XML DB repository as you describe. But when I execute the xlmquery with xdburitype(‘/public/q1.xqy’).getClob(), I get an ORA-19102 – XQuery string literal expected – error. When I execute ‘select xdburitype(‘/public/q1.xqy’).getClob() from dual’, it works fine.

    Do you have any idea what can cause this problem?

    Kind regards,

    Robbie

  2. Robert
    8/26/2008

    hi Marco,
    Sorry this question is not related to this post.

    I was reading XMLDB doc and came to this spot: [the spot]

    About using GLOBAL TEMPORARY TABLE under XMLDB…..

    The Schema-Based XMLType Tables under “structured storage” mode (xdb:defaultTable), this table can be GTT ?

    Thanks

  3. 8/26/2008

    The funny thing is that I “noticed” this a month ago myself (although I read the manual several times…)

    Now I just checked it…

    SQL*Plus: Release 11.1.0.6.0 - Production 
     
    Copyright (c) 1982, 2007, Oracle.  
    ALL rights reserved.
     
    Enter user-name: system@homework.nl
     
    Connected TO:
     
    Oracle DATABASE 11g Enterprise Edition 
    Release 11.1.0.6.0 - Production
    WITH the Partitioning, OLAP, DATA Mining 
    AND REAL Application Testing options
     
    SQL> CREATE global TEMPORARY TABLE GTTX OF xmltype;
     
    TABLE created.
     
    .

    I can imagine that you could use this form of storage for temporarily storage of intermediate results of XML data or such…

    Regarding the xdb annotation “xdb:defaultTable”, I would have to look further into this although I can imagine that this can be done via also using the annotation “xdb:tableProps”. Although text specified in this clause is appended to the generated create table statement (using dbms_xmlschema).

  4. Robert
    8/27/2008

    sigh…OTN forums still down….this is ridiculous

  5. Robert
    8/28/2008

    Thanks Marco,

    In my previous post, I was thinking about
    * setting “GENTABLES => FALSE” in “DBMS_XMLSCHEMA.registerSchema’
    * *manually* create the xdb:defaultTable as GTT.

    what do you think ?

    PS: Reason for using GTT is because I’m doing “Truncate Table” on the xdb:defaultTable to speed up the cleanup
    (per Marks suggestion: http://forums.oracle.com/forums/thread.jspa?messageID=1119858&#1119858)
    (per Mark and your suggestion: http://forums.oracle.com/forums/thread.jspa?messageID=2214058)

    This works like a charm except of course the DDL creates concurrency problem. :(

  6. 8/28/2008

    Manually is probably the only way to do a GTT

    I noticed though that deleting the folder resource is really fast while trying to get rid of the xml document “resources”

Comments are closed.