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 (188.8.131.52) Oracle_Home is set to /oracle/app/product/184.108.40.206/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.
[[email protected] ~]$ . oraenv ORACLE_SID = [oracle] ? ora12c The Oracle base has been set to /oracle/app [[email protected] ~]$ env | grep ORA ORACLE_SID=ora12c ORACLE_BASE=/oracle/app ORACLE_HOME=/oracle/app/product/220.127.116.11/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.
[[email protected] dbhome_1]$ dbca &  8853
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.
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.
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.
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.
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.
Step seven, is the progress screen.
When the pluggable database is created and successful, the DBCA will let you know.
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.
[[email protected] 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.