This content has been marked as final. Show 20 replies
This message will occur when a database created with Oracle Database 9iR2 version 126.96.36.199.0 is accessed after upgrading to version 188.8.131.52.0 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 184.108.40.206.0 and consequently when a new database is created it using the templates it is, in effect a 220.127.116.11.0 database and has to be upgraded by running catpatch before it can be used with 18.104.22.168.0 or later
The miumum supported release, client and server, is 22.214.171.124.0.
126.96.36.199.0 and 188.8.131.52.0 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.
See the XML DB Pages on OTN
In SQL*PLUS the following will work
Progammatically your would execute this as
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. SQL>
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.
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 SQL>
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
xmlnamespaces ( 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", ),
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.
First check if the XDB database schema exists
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Next check if RESOURCE_VIEW exists
SQL> select 1 from all_users where username = 'XDB'; 1 ---------- 1
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
SQL> desc RESOURCE_VIEW Name Null? Type ----------------------------------------- -------- ---------------------------- RES SYS.XMLTYPE(XMLSchema "http: //xmlns.oracle.com/xdb/XDBRe source.xsd" Element "Resourc e") ANY_PATH VARCHAR2(4000) RESID RAW(16)
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.