DB12c DBCA – Create a Pluggable Database

With the release of Oracle Database 12c, there is a lot of excitement and thoughts about multi-tenant databases.  This basically means that we can run more database while achieving  a smaller foot print on servers and within the infrastructure.  This concept of multi-tenant databases is actually going to make it cool again to be a DBA. Instead of fighting for resources to house multiple database; we can now use existing servers within the infrastructure and still provide the support organizations are looking for.

In this blog post, I want to show you how easy it is to create a pluggable database from the Database Configuration Assistant (DBCA). This is one of the many ways, Oracle has provided to end users for creating pluggable databases quickly and effortlessly.

As with any database install we need to have the binaries install before we can use DBCA.  Once the binaries are installed, we should have created a container database (CDB).  The container database is going to be where we create our pluggable database.  My environment for testing this is as follows:

Oracle Enterprise Linux 6.4 (V33411-01.iso)
Oracle Database 12c Enterprise Edition (12.1.0.1)
Oracle_Home is set to /oracle/app/product/12.1.0.1/dbhome_1

In short, I have a pretty generic environment set up.

Lets start the DBCA and create our pluggable database.

I always set my Oracle environment before I start to interact with Oracle tools.

[oracle@oel ~]$ . oraenv
ORACLE_SID = [oracle] ? ora12c
The Oracle base has been set to /oracle/app

[oracle@oel ~]$ env | grep ORA
ORACLE_SID=ora12c
ORACLE_BASE=/oracle/app
ORACLE_HOME=/oracle/app/product/12.1.0.1/dbhome_1

This actually makes it easier to start the DBCA because I don’t need to specify the path to the file since it is already setup in my environment.

Starting the DBCA is easy and will bring use to the first screen.  You will notice that Oracle has added a new option called “Manage Pluggable Databases“.  This is the path that the DBCA will use to manage, create, delete and alter any pluggable databases that are associated with the container database.

[oracle@oel dbhome_1]$ dbca &
[1] 8853

dbcacreate1.png

Step two, we have multiple options to use for the pluggable database(s).  Since we are focusing on creating a pluggable database, select the “Create Pluggable Database” option.

dbcaconfig2.png

Step three, we can choose what container database we would like to create the pluggable database in.  For the purpose of this example, I’m creating the pluggable in the “ora12c” container database.

dbcacreate3.png

Step four, we can create a new pluggable database.  We can also create a pluggable form a PDB archive or from an RMAN supported PDB file set.  Again, we are just creating so lets stick with the default option.

dbcacreate4.png

Step five, we have to name our PDB, identify what type of storage we are using and setup an initial PDB Admin user.  As a general rule, it is good to come up with a naming scheme for PDBs.  I tend to use pdb<name> format, just so I can keep track of what is PDB versus non-PDB.  For storage of a PDB, I’m using my file system for storage; however, you can also select an ASM instance to use.

dbcacreate5.png

Step six, is our review screen.  Review what you have selected and make sure it will create the PDB where you are expecting it to be created.

dbcacreate6.png

Step seven, is the progress screen.

dbcacreate7.png

When the pluggable database is created and successful, the DBCA will let you know.

dbcacreatesuccss.png

After closing DBCA, how can we tell if the pluggable database is created and running?  Pluggable databases are contained within a container database.  This means that we cannot use normal avenues of looking up a database process (ps -ef | grep -i peon).  Actually, one of the easiest way to see if the pluggable is running is to check the listener status.  The new pluggable database will automatically register with the listener upon creation.

[oracle@oel dbhome_1]$ lsnrctl status | grep -i pdbtest
Service "pdbtest.acme.com" has 1 instance(s).

Well, hope you see how easy it is to create a pluggable database from one of the tools that Oracle provides.

Enjoy!

twitter: @curtisbl294

blog: http://dbasolved.com

About these ads

2 comments

  1. Dear how to create a container database ? I tried the steps you add and only one database name appeared in the container database name and when I choosed it its giving error
    the selected database is not container database

    1. Did you create the database as a non-CDB or a CDB?

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

Oracle Data Warrior

Changing the world, one data model at a time. How can I help you?

Maaz Anjum's Blog

A life yet to be lived...

PeteWhoDidNotTweet

Stuff that interests me, if not you!

The Oracle Instructor

Explain, Exemplify, Empower

Frits Hoogland Weblog

IT Technology; Oracle, linux, TCP/IP and other stuff I find interesting

Oracle Spin - Flimatech Blog

Sharing Our Database Experience

Oracle Scratchpad

Just another Oracle weblog

Oracle SQL Tuning Tools and Tips

SQL Tuning, eAdam, eDB360, SQLT, SQLHC

DBA Kevlar

Tips, tricks, (and maybe a few rants) so more DBAs become bulletproof!

Follow

Get every new post delivered to your Inbox.

Join 1,438 other followers

%d bloggers like this: