Oracle XML Database Creation

XDB Removal :
The catnoqm.sql script drops XDB.
SQL> spool xdb_removal_1.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup
SQL> @?/rdbms/admin/catnoqm.sql
SQL> 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
(Any tablespace other than SYSTEM, UNDO and TEMP can be specified.
The specified tablespace must already exist prior to running the script.)
C. XDB user temporary tablespace
D. SecureFiles = 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.)
Therefore 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 ##
SQL> spool xdb_install.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup;
SQL> @?/rdbms/admin/catqm.sql <XDB pwd> <XDB default tbs> <XDB temporary tbs> <SecureFiles = YES/NO>
SQL> @?/rdbms/admin/utlrp.sql
SQL> spool off

Verify XDB Installation
SQL> spool xdb_status.txt
SQL> set echo on;
SQL> connect / as sysdba
SQL> set pagesize 1000
SQL> col comp_name format a36
SQL> col version format a12
SQL> col status format a8
SQL> col owner format a12
SQL> col object_name format a35
SQL> col name format a25

-- Check status of  Xml DB (XDB)
SQL> select comp_name, version, status from dba_registry
     where comp_id = 'XDB';

-- Check for invalid objects owned by Xml DB (XDB)
SQL> select owner, object_name, object_type, status from dba_objects
     where status = 'INVALID' and owner = 'XDB';
spool off;

No comments:

Post a Comment