1 2 Previous Next 20 Replies Latest reply: Jul 18, 2008 5:20 PM by mdrake RSS


      This is the official XML DB FAQ Thread. It is a locked thread. I will update it as I see commonly asked questions.
        • 4. Why am I getting an ORA-00600 with arguments [qmxiUnpPacked2], [121] ?
          This message will occur when a database created with Oracle Database 9iR2 version is accessed after upgrading to version or later.

          The error message indicates that the catpatch upgrade script, found in $ORACLE_HOME/rdbms/admin was not run after installing the upgrade, or that the script failed to run successfully.

          The problem can also occur in later versions of the 9.2.x product when a new database is created using DBCA. The Seed database templates in 9.2.x. were created with and consequently when a new database is created it using the templates it is, in effect a database and has to be upgraded by running catpatch before it can be used with or later
          • 5. What is the minmum supported database release for XML DB functionality ?
            The miumum supported release, client and server, is

   and are not supported for any XMLType related functionalilty, including using of the DBMS_XMLPARSER, DBMS_XMLDOM and DBMS_XSLPROCESSOR packages, XMLType tables or columns or SQL/XML publishing functions.
            • 6. Where can I learn more about the XML DB features ?
              See the XML DB Pages on OTN

              • 10. How to I use namespaces with XMLQuery() ?
                In SQL*PLUS the following will work
                SQL> xquery xquery version "1.0"; (: :)
                  2          declare default element namespace "POI"; (: :)
                  3              for $x in fn:doc("/urs/025_XPOI/XDB/xdb/Simple/xml/001_03082006/xpoi/simple.xml")/Simple_XPOIS/Simple
                  4            where $x/ID = 1
                  5           return $x
                  6  / 
                No items selected.
                Progammatically your would execute this as
                SQL> select *
                  2    from xmltable
                  3         ('xquery version "1.0"; (: :)
                  4          declare default element namespace "POI"; (: :)
                  5              for $x in fn:doc("/urs/025_XPOI/XDB/xdb/Simple/xml/001_03082006/xpoi/simple.xml")/Simple_XPOIS/Simple
                  6            where $x/ID = 1
                  7           return $x'
                  8         )
                  9  / 
                no rows selected
                The empty comments '(: :)' at the end of each XQuery statemetn are introduced to stop the SQL*PLUS interpreter from treating the ';' as the end of the SQL Statement.
                • 11. How do I declare namespace prefix mapping with XMLTable() ?
                  Namespace : Prefix mapping are declared by including an xmlNamespaces operator as the first item inside the XMLTable operator. The form of the xmlNamespaces operator is shown below
                     default 'http://www.courts.state.mn.us/CourtXML/2.0.0',
                      'http://schemas.xmlsoap.org/ws/2004/03/addressing' as "wsa",
                      'http://schemas.xmlsoap.org/soap/envelope/' as "soap", 
                  • 13. Why is the size of my XML document 0 bytes when viewed via HTTP or FTP ?
                    When a schema based XML is loaded into the XML DB repository via HTTP, FTP or dbms_xdb.createResource() the document is converted from a textual serialization of XML into a series of objects. At this point the size of the document becomes (a) meaningless and (b) difficult / expensive to calculate.

                    The first question is what is meant by the size of the document once it has been stored using object-based persistence ? There are two possibilities

                    (1) The number of bytes used the text serialization of the XML document.

                    (2) The number of bytes required to store the internal object representation of the document. In this case the does the size include the bytes used for keys, refs indexes, etc ?

                    Since (1) would be expensive to maintain as the document is updated (particularly in the case of partial updates) and (2) is expensive to calculate on a document by document basis, XML DB shows the size of all schema based XML documents as 'zero' bytes.

                    Note that this also applies to the size of the registered version of XML Schema documents, which can be found in the folder tree /sys/schemas.

                    If a schema based XML document is loaded into the repository and does not appear as 0 bytes long when viewed via HTTP or WebDAV this means that XML DB was unable to identifiy the XML schema the XML document is associated with.

                    Note that immediatlely after uploading a document in Windows Explorer using the WebDAV protocol the size of the document will be non-zero, since the original size is cached by the Microsoft WebDAV client. However once a refresh of the folder is performed in Windows Explorer the size should be shown as zero if the document was recognized as a schema based document.
                    • 14. How do I tell if XML DB is installed.. How do I install it.. ?
                      First check if the XDB database schema exists

                      Oracle Database 10g Enterprise Edition Release - Production
                      With the Partitioning, OLAP and Data Mining options
                      SQL> select 1 from all_users where username  = 'XDB';
                      Next check if RESOURCE_VIEW exists
                      SQL> desc RESOURCE_VIEW
                       Name                                      Null?    Type
                       ----------------------------------------- -------- ----------------------------
                       RES                                                SYS.XMLTYPE(XMLSchema "http:
                                                                          source.xsd" Element "Resourc
                       ANY_PATH                                           VARCHAR2(4000)
                       RESID                                              RAW(16)
                      If the first query returns 0 then XDB has not been installed. It can be installed by running the catqm.sql script found in $ORACLE_HOME/rdbms/admin. This script will create the XDB database schema and the tables needed for XML Schema registration and the XML DB repository. The script takes 3 arguments

                      1. The password for the XDB database user

                      2. The tablespace for the objects owned by the database user XDB

                      3. The temporary tablespace that will be used by the XDB database user.

                      Note if the XDB user exists but RESOURCE_VIEW does not do not run catqm. This situation would mean that you have some other database schema called XDB. You need to resolve this before installing XDB.
                      1 2 Previous Next