Primary Note for Oracle XML Database (XDB) Install / Deinstall
(Doc ID 1292089.1)
Last updated on APRIL 06, 2022
Applies to:
Oracle Database - Enterprise Edition - Version 9.2.0.3 to 18.3.0.0.0 [Release 9.2 to 18]Oracle Multimedia - Version 11.2.0.3 to 12.2.0.1 [Release 11.2 to 12.2]
Information in this document applies to any platform.
Details
- What if the database is using the DICOM and/or Oracle Application Express (APEX) features?
If the above code block has objects owned by ORDDATA and/or APEX_030200, it means those components are installed in the database. If those components are being used in a production capacity, XDB should not be removed and reinstalled as data that is maintained in the XDB user schema will be lost.
- The default XMLType storage model is used if a storage model is not specified when creating an XMLType table or column. Prior to Oracle Database 11g Release 2, unstructured (CLOB) storage was used by default. The default storage model is now binary XML storage.
Please see the following document for more information:
(Doc ID 1207893.1) Change in default storage model of XMLType to BINARY XML in 11.2.0.2
- Beginning with 11g, JAVA Virtual Machine (JVM) is no longer required for a successful installation of XDB. However, if an attempt is made to run XQUERY statements which use a functional evaluation path, an error will be thrown stating that JVM is not installed. Also note that JVM must be installed for XDK functionality.
- Beginning with 11.2, XDB now supports SecureFiles. To use SecureFiles, compatibility must be set to 11.2. If SecureFiles will be used, the tablespace specified for the XDB repository must be using Automatic Segment Space Management (ASSM).
Since SecureFiles is now supported with 11.2, an additional parameter was added to the catqm.sql script in that release.
11.1 - XDB Removal and Reinstall
XDB Removal
The catnoqm.sql script drops XDB.
spool xdb_removal.log
set echo on;
connect / as sysdba
shutdown immediate;
startup
@?/rdbms/admin/catnoqm.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
set pagesize 1000
col owner format a8
col object_name format a35
select owner, object_name, object_type, status
from dba_objects
where status = 'INVALID' and owner = 'SYS';
spool off;
XDB Installation
The catqm.sql script requires the following parameters be passed to it when run:
A. XDB user password
B. XDB user default tablespace
* The SYSTEM, UNDO and TEMP tablespace cannot be specified.
* The specified tablespace must already exist prior to running the script.
* A tablespace other than SYSAUX should be specified, especially if you expect Oracle XML DB Repository to contain a large amount of data.
* For example:
create tablespace XDB
datafile '<file name>.dbf' size 2000M
extent management local uniform size 256K segment space management auto;
C. XDB user temporary tablespace
The syntax to run catqm.sql is the following:
SQL> @?/rdbms/admin/catqm.sql A B C
For example:
SQL> @?/rdbms/admin/catqm.sql xdb XDB TEMP
## IMPORTANT: You must shutdown and restart the database between removal and reinstall ##
spool xdb_install.log
set echo on;
connect / as sysdba
shutdown immediate;
startup;
@?/rdbms/admin/catqm.sql <XDB pwd> <XDB default tbs> <XDB temporary tbs> -- substitute the parameters with appropriate values
@?/rdbms/admin/utlrp.sql
spool off
11.2 - XDB Removal and Reinstall
XDB Removal
The catnoqm.sql script drops XDB.
spool xdb_removal.log
set echo on;
connect / as sysdba
shutdown immediate;
startup
@?/rdbms/admin/catnoqm.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
set pagesize 1000
col owner format a8
col object_name format a35
select owner, object_name, object_type, status
from dba_objects
where status = 'INVALID' and owner = 'SYS';
spool off;
Some XDB related objects in the SYS schema are not dropped during the removal of XDB. Also, the SYS.KU$_% views will become invalid. Please see the following document for cleaning up these objects:
(Doc ID 1269470.1) XDB Deinstallation script catnoqm.sql leads to Invalid SYS Objects
XDB Installation
The catqm.sql script requires the following parameters be passed to it when run:
A. XDB user password
B. XDB user default tablespace
* The SYSTEM, UNDO and TEMP tablespace cannot be specified.
* The specified tablespace must already exist prior to running the script.
* A tablespace other than SYSAUX should be specified, especially if you expect Oracle XML DB Repository to contain a large amount of data.
* For example:
create tablespace XDB
datafile '<file name>.dbf' size 2000M
extent management local uniform size 256K segment space management auto;
C. XDB user temporary tablespace
D. YES or NO
* If YES is specified, the XDB repository will use SecureFile storage.
* If NO is specified, LOBS will be used.
* To use SecureFiles, compatibility must be set to 11.2.
* The tablespace specified for the XDB repository must be using Automatic Segment Space Management (ASSM) for SecureFiles to be used.
The syntax to run catqm.sql is the following:
SQL> catqm.sql A B C D
For Example:
SQL> @?/rdbms/admin/catqm.sql xdb XDB TEMP YES
## IMPORTANT: You must shutdown and restart the database between removal and reinstall ##
spool xdb_install.log
set echo on;
connect / as sysdba
shutdown immediate;
startup;
@?/rdbms/admin/catqm.sql <XDB pwd> <XDB default tbs> <XDB temporary tbs> <YES or NO> -- substitute the parameters with appropriate values
@?/rdbms/admin/utlrp.sql
spool off
12.1 and onward - XDB is Mandatory
Oracle XML DB is now a mandatory component of Oracle Database. You cannot uninstall it, and if Oracle XML DB is not already installed in your database prior to an upgrade to Oracle Database 12c Release 1 (12.1.0.1) or later, then it is automatically installed in tablespace SYSAUX during the upgrade. If Oracle XML DB has thus been automatically installed, and if you want to use Oracle XML DB, then, after the upgrade operation, you must set the database compatibility to at least 12.1.0.1. If the compatibility is less than 12.1.0.1 then an error is raised when you try to use Oracle XML DB.
Verify XDB Installation
spool xdb_status.txt
set echo on;
connect / as sysdba
set pagesize 1000
col comp_name format a36
col version format a12
col status format a8
col owner format a12
col object_name format a35
col name format a25
-- Check status of XDB
select comp_name, version, status
from dba_registry
where comp_id = 'XDB';
-- Check for invalid objects
select owner, object_name, object_type, status
from dba_objects
where status = 'INVALID'
and owner in ('SYS', 'XDB');
spool off;
Known Issues
- If for any reason the catqm.sql script fails, it is recommended to look at log files to determine the reason why the install failed. If the script doesn't complete OR if the following error is reported after repeating the XDB installation:
ORA-04098: trigger 'SYS.XDB_INSTALLATION_TRIGGER' is invalid and failed re-validation.
If this occurs, implement the steps in the following documents:
(Doc ID 1573175.1) Upgrading or Installing XDB could result in data loss if XDB_INSTALLATION_TRIGGER exists
(Doc ID 331378.1) Running catqm.sql Leads to ORA-4098 Trigger 'SYS.XDB_INSTALLATION_TRIGGER' is Invalid
- Some times one or more of the following errors can be encountered when installing XDB, upgrading XDB, configuring APEX, running an Export, or selecting from xdb.xdb$resource/sys.dba_network_acls:
ORA-31159: XML DB is in an invalid state
ORA-00600: internal error code, arguments: [unable to load XDB library]
ORA-00600: internal error code, arguments: [qmx: no ref]
ORA-00600: internal error code, arguments: [qmtGetColumnInfo1]
ORA-00600: internal error code, arguments: [qmtb_init_len]
ORA-00600: internal error code, arguments: [qmtGetBaseType]
ORA-00600: internal error code, arguments: [psdnop-1], [600]
ORA-00600: internal error code, arguments: [qmtInit1]
ORA-07445: exception encountered: core dump [_memcpy()+224] [SIGSEGV] [Address not mapped to object]
ORA-19051 Cannot Use Fast Path Insert For This XMLType Table
ORA-31011: XML parsing failed
ORA-00600: internal error code, arguments: [qmtcolcb_nomatch], [ID], [annotation], [], [], [], [], [], [], [], [], []
Errors of this sort generally occur when the init routines for the internal XDB functions are run in an invalid environment, causing memory corruption.
This can happen if the database was ever started with the LD_LIBRARY_PATH (LIBPATH for AIX or SHLIB_PATH for HP) pointing to the wrong $ORACLE_HOME/lib directory rather than to the correct location for the instance. The LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH environment variable is used to resolve the location of the shared library "libxdb.so (libxdb.sl on HP)".
To resolve this issue, please do the following:
1. Stop the listener and shutdown the database
2. Set LD_LIBRARY_PATH (LIBPATH for AIX or SHLIB_PATH for HP) as follows:
csh: setenv LD_LIBRARY_PATH $ORACLE_HOME/lib:<other paths>
ksh: export LD_LIBRARY_PATH=$ORACLE_HOME/lib:<other paths>
3. If a client connects to an 11g instance using a 10g listener, modify or add the ENVS= "LD_LIBRARY_PATH" to the listener.ora file
so that it points to the 11g instance:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
...
)
(SID_DESC =
(SID_NAME =11gSID)
(ORACLE_HOME =<oracle home path>)
(ENVS= "LD_LIBRARY_PATH=<oracle home path>/lib")
)
)
4. If a client connects to a 10g instance using an 11g listener, modify or add the ENVS= "LD_LIBRARY_PATH" to the listener.ora file
so that it points to the 10g instance:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
...
)
(SID_DESC =
(SID_NAME =10gSID)
(ORACLE_HOME =<10g Oracle home path>)
(ENVS= "LD_LIBRARY_PATH=<10g Oracle Home path>/lib")
)
)
5. On AIX only, to remove any currently unused modules in the kernel and library memory, run /usr/sbin/slibclean as root.
6. Restart the database and the listener.
- It is possible to check the current settings of LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH by referencing the following document:
(Doc ID 373303.1) How to Check the Environment Variables for an Oracle Process
- XDB is invalid after installation or upgrade and there are invalid XDB objects which fail to compile with the following errors:
PLS-00201: identifier 'DBMS_LOB' must be declared
or
PLS-00201: identifier 'UTL_FILE' must be declared
XDB does not have execute permissions on the DBMS_LOB and UTL_FILE packages.
Please reference the following documents:
(Doc ID 429551.1) Invalid XDB Objects After XDB Install
(Doc ID 1105245.1) XDB Is INVALID In DBA_REGISTRY After Having Revoked Privileges: What Privileges Are Needed?
- (Doc ID 243555.1) Create DB or Installing XDB Fails ORA-22973
- (Doc ID 1168180.1) Error ORA-46105 When Trying To Create An ACL
- If the error message "ORA-04043: object XDB_DATASTORE_PROC does not exist" is encountered during XDB installation, this indicates that Oracle Text was not installed.
Please reference the following document for details:
(Doc ID 360907.1) Catupgrd.sql Gives ORA-4043 Error On XDB_DATASTORE_PROC
- Prior to 11.2, if XDB is deinstalled and not reinstalled, orphaned XSD objects can exist that will need to be dropped manually. Please review the document below:
(Doc ID 1273520.1) After de-installing XDB many XSD objects are invalid
On release 11.2 onwards, catnoqm.sql will remove these objects.
Specific to 11.2
- (Doc ID 1273944.1) Installation of XDB failed with ORA-20004: Tablespace system is not ASSM, ORA-43853
- (Doc ID 1086092.1) ORA-60019: Creating initial extent of size X installing XDB with SECUREFILES
- (Doc ID 1168180.1) Error ORA-46105 When Trying To Create An ACL
- Regardless of the option specified for SECUREFILES when installing XDB, XDB's default tablespace MUST BE an ASSM tablespace if COMPATIBLE >= 11.2. Please review the document below:
(Doc ID 1337065.1) XDB is INVALID after ORA-31084 ORA-43853 errors during install
- If you have 'Password Complexity Verification' function enabled at the time of manual install then in 11.1.x or 11.2.x install may fail with the error message:
ORA-28003: password verification for the specified password failed
ORA-20001: Password length less than 8
Please reference the following document for details:
(Doc ID 1297620.1) XDB is INVALID in DBA_REGISTRY after Fresh Installation
XDB Demo Scripts
You can go through a variety of Live XDB demos from the browser that provide a simple introduction to storing, indexing, updating and querying XML document with Oracle Database:
The window below is a live discussion of this article (not a screenshot). We encourage you to join the discussion by clicking the "Reply" link below for the entry you would like to provide feedback on. If you have questions or implementation issues with the information in the article above, please share that below.
Contacts
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Details |
Actions |
Best Practices |
Reloading XDB |
Oracle 9i - XDB Reload |
Oracle 10.1 and above - XDB Reload |
Deinstalling and Reinstalling XDB |
9.2 - XDB Removal and Reinstall |
10g - XDB Removal and Reinstall |
11g - XDB Removal and Reinstall |
11.1 - XDB Removal and Reinstall |
11.2 - XDB Removal and Reinstall |
Verify XDB Installation |
Known Issues |
XDB Demo Scripts |
Contacts |
References |