Creating an Oracle 12c Pluggable Database & Container Database using DBCA

In this example, I’ve already installed the Oracle Database 12c software on one of my Linux 6.4 machines.  Using the DBCA tool (in advanced mode), I’m going to create a new container database named “cdb” and at the same time create a pluggable database named “pdb”.

The idea behind this new “pluggable databases” feature in 12c (also know as “multi-tenancy”), is that you build a single Container Database (CDB), which can contain many (up to 250 of them!) Pluggable Databases (PDB).  These pluggable databases appear like any ordinary pre-12c database would do to end-users/applications.  However, the container database owns the SGA and background processes, and the pluggable databases are serviced by the container database resources.

All of the data files will be stored under the /u02/oradata/{DB_NAME} directory, set-up by ‘root’ as follows:

mkdir -p /u02
chown -R oracle:oinstall /u02
chmod -R 775 /u02

Start the Database Configuration Assistant (DBCA)

Open an X-Windows session to the server as the ‘oracle’ user.

Set your ORACLE_HOME environment variable appropriately, then start the assistant by running the following:

export ORACLE_HOME=/u01/app/oracle/product/12.1.0.1
$ORACLE_HOME/bin/dbca

Once the GUI starts, respond as follows:

  • Database Operation
    • Create Database
    • Next

  • Creation Mode
    • Tick ‘Advanced Mode’
    • Next

  • Database Template
    • General Purpose or Transaction Processing.
    • Next

  • Database Identification
    • Global Database Name: cdb
    • SID: cdb
    • Tick ‘Create as Container Database’
    • Select ‘Create a Container Database with one or more PDBs’
    • PDB Name: pdb
    • Next

  • Management Options
    • Leave ‘Configure Enterprise Manager (EM) Database Express’ ticked, unless you want to register your database(s) with EM Cloud Control
    • Next

  • Database Credentials
    • Select ‘Use the Same Administrative Password for All Accounts’ (unless you want to separate them out of course)
    • Password: ******
    • Confirm Password: ******
    • Next

  • Network Configuration
    • If you don’t have any existing listener services running, tick ‘Select’ to create a new listener
    • Name: LISTENER
    • Port: 1521
    • Otherwise, select an existing listener service as appropriate
    • Next

  • Storage Locations
    • Storage Type: File System
    • Select ‘Use Common Location for All Database Files’
      • Database File Locations: /u02/oradata
    • Tick ‘Specify Fast Recovery Area’
      • Fast Recovery Area: {ORACLE_BASE}/fra
    • Tick Enable Archiving
    • Click on ‘Edit Archive Mode Parameters’
      • Archive Log File Format: %t_%s_%r.arc (change extension to .arc)
      • OK
    • Next

  • Database Options
    • Optionally, check ‘Sample Schemas’ (this will create an ‘EXAMPLE’ tablespace and some sample schemas). I recommend leaving this unticked if this is to become a live environment.
    • Next

  • Initialization Parameters
    • Use ‘Typical Settings’
    • Ensure ‘Use Automatic Memory Management’ is ticked
    • Change the ‘Memory Size’ value accordingly (or leave default as 40% of total machine memory)
    • Review any additional parameters by clicking ‘All Initialization Parameters’
    • Next

  • Creation Options
    • Leave ‘Create Database’ ticked
    • Optionally tick ‘Generate Database Creation Scripts’ if you prefer to keep it for future reference.
    • Check the ‘Customize Storage Locations’ settings and update accordingly if required
    • Next

  • Pre Requisite Checks
    • Assuming all database validation checks are successful, you shouldn’t actually see this page as the installer will automatically move onto the next screen.

  • Summary
    • Check the ‘Create Database – Summary’ details are as you’d expect.
    • Finish

            

Once the DBCA work has completed, you’ll be provided with the Enterprise Manager Database Express 12c URL, which will be something like this (HTTPS port 5500 by default):

https://linux06.vbox:5500/em

  

At the moment, it doesn’t look as though DB Express 12c  fully supports Container Databases.  You’ll notice the “Resources” and “SQL Monitor” boxes in the screen shot above were stuck with a “Loading…” status, and eventually these just resulted in an error for me, with the following error message being logged in the alert log:

ORA-07445: exception encountered: core dump [qervwRowProcedure()+113] [SIGSEGV] [ADDR:0x5] [PC:0xB71F161] [Address not mapped to object] []

When I tested this installation again without any Container Database, everything worked fine.

Related posts:

Oracle Database 12c (12.1.0.1.0) installation on Oracle Linux 6
Enterprise Manager Database Express 12c (TBP)

References:
Creating and Managing a Database with DBCA

One thought on “Creating an Oracle 12c Pluggable Database & Container Database using DBCA

Leave a comment

Your email address will not be published. Required fields are marked *