Create Multitenant DB

#########################################
##      How to create a CDB Database        ##
###############################################

–The ENABLE PLUGGABLE DATABASE clause defines that this is a Container Database.

CREATE DATABASE cdb_01
USER SYS IDENTIFIED BY <password>
USER SYSTEM IDENTIFIED BY <password>
LOGFILE GROUP 1 ('/u01/logs/redo01a.log','/u02/logs/redo01b.log') SIZE 500M BLOCKSIZE 512,
GROUP 2 ('/u01/logs/redo02a.log','/u02/logs/redo02b.log') SIZE 500M BLOCKSIZE 512,
GROUP 3 ('/u01/logs/redo03a.log','/u02/logs/redo03b.log') SIZE 500M BLOCKSIZE 512
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 1024
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/cdb_01/system01.dbf' SIZE 1024M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SYSAUX DATAFILE '/u01/cdb_01/sysaux01.dbf' SIZE 1024M REUSE AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
DEFAULT TABLESPACE USERS DATAFILE '/u01/cdb_01/users01.dbf' SIZE 50M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/cdb_01/temp01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
UNDO TABLESPACE undotbs1 DATAFILE '/u01/cdb_01/undotbs01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
ENABLE PLUGGABLE DATABASE
SEED
FILE_NAME_CONVERT = ('/u01/cdb_01/','/u01/pdbs/pdbseed/')
SYSTEM DATAFILES SIZE 125M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED
SYSAUX DATAFILES SIZE 100M
USER_DATA TABLESPACE user_data
DATAFILE '/u01/pdbs/pdbseed/user_data.dbf' SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s