HOWTO: Do a clean XML DB installation…

Just here as a small side note, some steps to do a XMLDB clean installation without other more unnecessary functionality. Depending on using the Protocol Server or not, also take into account database parameter settings like SHARED_SERVERS (eg. value=5), JAVA_POOL (XQuery and other support), PGA_AGGREGATED_TARGET (DOM validation), SGA_TARGET or MEMORY_TARGET, LARGE_POOL (shared server). My advise would be to not use automatic memory wizards while using XML DB. Although I don’t have a good example anymore at hand, I have seen no or to late response of the database while working with statements that needed a lot of DOM validation in memory. If possible use unicode characterset for your database, AL32UTF8, to avoid future issues within your environment regarding NLS conversion issues.

startup nomount;

CREATE DATABASE "xmldb"
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
DATAFILE '/u02/app/oradata/xmldb/system01.dbf' SIZE 400M REUSE AUTOEXTEND ON NEXT
10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/u02/app/oradata/xmldb/sysaux01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT
10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u02/app/oradata/xmldb/temp01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT
640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/u02/app/oradata/xmldb/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON
NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('/u02/app/oradata/xmldb/redo01.log') SIZE 51200K,
GROUP 2 ('/u02/app/oradata/xmldb/redo02.log') SIZE 51200K,
GROUP 3 ('/u02/app/oradata/xmldb/redo03.log') SIZE 51200K
USER SYS IDENTIFIED BY "change_on_install" USER SYSTEM IDENTIFIED BY "manager";

@/u02/app/product/11.1.0/rdbms/admin/catalog.sql
@/u02/app/product/11.1.0/rdbms/admin/catblock.sql
@/u02/app/product/11.1.0/rdbms/admin/catproc.sql
@/u02/app/product/11.1.0/rdbms/admin/catoctk.sql
@/u02/app/product/11.1.0/javavm/install/initjvm.sql
@/u02/app/product/11.1.0/rdbms/admin/catqm.sql change_on_install SYSAUX TEMP YES
@/u02/app/product/11.1.0/rdbms/admin/utlrp.sql

The created database contains following options:

SQL> select comp_name from dba_registry;

COMP_NAME
------------------------------
Oracle XML Database
Oracle Database Catalog Views
Oracle Database Packages and Types
JServer JAVA Virtual Machine
.

I know the example is far from perfect and it is not easy nowadays to get rid of the overhead or privileges granted via public. Avoid using a SYSAUX tablespace, if not only that it is crowded with non XDB related stuff, but create a dedicated XDB tablespace with ASSM enabled.

Marco Gralike Written by:

4 Comments

  1. July 13

    Thank goodness!

    I thought this blog post might be about something else when I noticed something in my reader!

    But I shall be first … Scoop! 😉

  2. Ben
    November 4

    in the following line
    @/u02/app/product/11.1.0/rdbms/admin/catqm.sql change_on_install SYSAUX TEMP
    YES

    What is the YES implying?

    • November 5

      The YES stands for SECUREFILE based XDB objects by default or not. If you choose NO then the installation will use BASICFILE storage for all XMLType objects and tables which have storage dependancies. This extra parameter is used from version 11.2.0.1 and onwards. Before this version you won’t have to address this / can omit this parameter.

Comments are closed.