Wednesday, July 3, 2013

Create Oracle Database 12c Container Database (CDB) using DBCA

In this demo I show how to create a CDB using DBCA

If you have not read or heard about CDB or PDB I recommend a few references below.

Create Container Database using DBCA

1. ./dbca

2. Select create database click next

3.  Here you can select to create database with default options or choose advance mode to have more control over how the database is created. Click next

In my case I choose advance mode.
4. Select the template that you want to use and click next

In my case I like to choose custom database. Note: the template called testdbs is one I created not one of Oracle's templates.
5. Set the global database and SID name. Select create as container database you can choose to have the CDB empty or include creating a PDB or PDBs. Click next

In my case I choose to create CDB empty.
6. Management options you can select to configure EM Express or Cloud Control click next.

In my case I left blank.
7. Set the sys and system password you can choose to set both the be the same but is not best practice. The warning message you see are because my password does not conform to Oracle's recommendation. Click next.

Since this is a test lab we are not concern with the password.
8. Network configuration gives you the options to register CDB to any listener running on the server. If you do not select any listener the CDB will be registered to the default listener. Click next
9. Set the database storage options for datafiles and recovery related files.

See 9.1 for multiplex of redo and controlfile.

Click next.

In my case I am going to use ASM for both the datafiles and recovery related files
9.1 It is best practice to  multiplex your redo and controlfiles into different locations. Click OK

In my case I provided to different ASM diskgroups.
10. Database options click next
11. With 12c DBCA you now have the option of setting the Database vault & label security. Click next

In my case I will not set these security options.
12.1 Init Parameters

Set memory option if you will use AMM or preset SGA/PGA
12.2 Sizing

Set block size and processes
12.3 Character sets

Set the character set as needed note best practice is to set Unicode (AL32UTF8)
12.4 Connection mode

Set the connection mode to be used

Once complete with the initialization parameters click next
13. You can choose to save this configuration as a template and also create script to execute for creation.

Select create database and click next
14. Review summary click finish
15. Database CDB creation will begin and we can monitor the progress
16. Click the activity log and alert log button to monitor the detail progress of the database creation.
17. When database creation is complete click close.



If you would like to see a video of the database CDB creation click my YouTube video below.


Follow me on Twitter

My webpages
http://db12c.blogspot.com/
http://cloudcontrol12c.blogspot.com/
http://www.youtube.com/user/jfruiz11375

References:

Oracle Database 12c Multitenant Architecture Overview
Install Oracle 12c (12.1) + New Features and Tips
Oracle 12c Documentation Library

5 comments:

  1. I am getting an Oracle dbca NullPointerException when trying to create a PDB (Pluggable Database) usingdbca response file in silent mode.

    I have a Oracle 12c CDB up and running, listener is also up, $ORACLE_HOME and $ORACLE_SID are also set correctly.

    After database install and creating CDB using response files, I am now trying to create a PDB using dbca response file. Contents of dbca.rsp -

    [GENERAL]
    RESPONSEFILE_VERSION = "12.1.0"
    OPERATION_TYPE = "createPluggableDatabase"
    [CREATEPLUGGABLEDATABASE]
    SOURCEDB = "orcl"
    PDBNAME = "dev"
    CREATEPDBFROM = "DEFAULT"
    PDBADMINUSERNAME = "oracle"
    PDBADMINPASSWORD = "oracle"
    CREATEUSERTABLESPACE = "true"
    I tried following commands:

    dbca -silent -responseFile //dbca.rsp

    dbca -silent -createPluggableDatabase -responseFile //dbca.rsp
    Both give same error:

    ---- Begin output of /u01/app/oracle/product/12c/db_1/bin/dbca -silent -responseFile //dbca.rsp
    STDOUT:
    STDERR: Exception in thread "main" java.lang.NullPointerException
    at oracle.sysman.assistants.dbca.backend.CommandLineArguments.processResponseFile(CommandLineArguments.java:6885)
    at oracle.sysman.assistants.dbca.backend.CommandLineArguments.process(CommandLineArguments.java:4544)
    at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:110)
    at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:184)
    However when I pass exact same parameters as command line arguments, dbca works absolutely fine and PDB is created: Following command runs succefully.

    dbca -silent -createPluggableDatabase -sourceDB orcl -pdbName dev -createPDBFrom default -pdbAdminUserName oracle -pdbAdminPassword oracle -createUserTableSpace true
    My environment need installation using response files only. I had used a dbca response file with "createDatabase" option for CDB and it worked fine. Error is observed only when I run it with OPERATION_TYPE as "createPluggableDatabase".

    There is an option to create PDBs along with CDB creation when OPERATION_TYPE is "createDatabase". But Oracle does not give flexibility to name PDBs in this option. If I ask Oracle to create 3 PDBs, it will name them itself like PDB01, PDB02, PDB03 and so on. This doesn't work in my deployment because of applications compile time dependencies on specific PDB names.

    ReplyDelete
  2. This is currently the way DBCA works it will add 01,02,03 etc... to the new of each PDB that is created. As far as I know there is no way around this. If you need to have a specific name for the PDB and you need to create multiple PDBs at one time you can script it.

    ReplyDelete
  3. ORACLE DATABASE 12C CLUSTERWARE ADMINSTRATION
    This Oracle Database 12c: Cluster ware Administration training will explore general cluster concepts and Oracle Cluster ware architecture. Work with expert Oracle University instructors through interactive instruction and hands-on exercises to reinforce your learning. Oracle Cluster ware is the cross platform cluster software required to run the Real Application Clusters (RAC) option for Oracle Database. It provides the basic clustering services at the operating system level that enable Oracle software to run in clustering mode. In earlier versions of Oracle (version 9i and earlier), RAC required a vendor supplied cluster ware like Sun Cluster or Veritas Cluster Server with the exception of Linux and Windows.
    Benefits:
    Learn how to make applications highly available using Oracle Cluster ware. You'll walk away with the ability to install,configure, manage and troubleshoot both standard and flex clusters. Furthermore, you will have developed the skills toupgrade and patch Cluster ware environments.
     To join Online Training session kindly feel free to contact with us
     Name - saurabh srivastava
     Email - id - saurabh@maxmunus.com
     Contact No. - +91 -8553576305
     Skype- saurabhmaxmunus
     Company Website - http://www.maxmunus.com

    ReplyDelete

About Me

My photo

Senior DBA with over 16 years experience, specializing in "Database Performance Tuning" and High Availability (RAC, Data Guard & Oracle Golden Gate).