Creating a Container Database Using SQL Commands Contd...

Step 3- Set the ORACLE_SID environment variable and start the instance

$ export ORACLE_SID=icacdb
$ sqlplus
Enter User: / as sysdba

SQL>

Step 4:- Give Create Database statement as follows

CREATE DATABASE icacdb
LOGFILE
GROUP 1 '/u02/oracle/icacdb/log1.ora' size 10M,
GROUP 2 '/u02/oracle/icacdb/log2.ora' size 10M
EXTENT MANAGEMENT LOCAL
DATAFILE '/u02/oracle/icacdb/system01.dbf'
    SIZE 700M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SYSAUX DATAFILE '/u02/oracle/icacdb/sysaux01.dbf'
    SIZE 550M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TABLESPACE deftbs
    DATAFILE '/u02/oracle/icacdb/deftbs01.dbf' SIZE 500M
        REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1 TEMPFILE '/u02/oracle/icacdb/temp01.dbf'
    SIZE 20M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
UNDO TABLESPACE undotbs1
    DATAFILE '/u02/oracle/icacdb/undotbs01.dbf'
        SIZE 200M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
ENABLE PLUGGABLE DATABASE
SEED
FILE_NAME_CONVERT =
    ('/u02/oracle/icacdb/',
    '/u02/oracle/icacdb/pdbseed/')
SYSTEM DATAFILES SIZE 125M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
SYSAUX DATAFILES SIZE 100M
USER_DATA TABLESPACE usertbs
    DATAFILE '/u02/oracle/icacdb/pdbseed/usertbs01.dbf'
        SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

Step 5:-
Run the scripts. In Oracle 12c it is recommended to run catalog and catproc scripts through Perl program catcon.pl

Goto ORACLE_HOME/rdbms/admin directory. This is where all the scripts are available.

$cd $ORACLE_HOME/rdbms/admin

 

 

Give the following command at O/s prompt

$perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b catalog_output catalog.sql
$perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b catproc_output catproc.sql
$perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b catblock_output catblock.sql
$perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b catoctk_output catoctk.sql
$perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b owminst_output owminst.plb
$perl catcon.pl -d $ORACLE_HOME/sqlplus/admin -b pupbld_output pupbld.sql

Continued on Next Page

 

New: Modern Oracle

Concepts here also apply to Oracle 19c/21c/23ai unless a version note says otherwise. See the homepage for what's changed.