Currently there is an interesting thread on the oracle-l mailing list about OEM 12c support for database 12c Release. Unlike previous OEM generations this time OEM was not lagging behind. I am using OEM 184.108.40.206.0 with the database plugin 220.127.116.11.0 and yes, I can see PDBs!
The above snapshot is from the database targets overview page. As you can see there is a Container Database (CDB1) and it has exactly 1 PDB. When you click on the CDB you get to the main page:
This is pretty cool because it allows you to view the resources consumed by the CDB broken down into the CDB$ROOT as well as the PDBs. When you click on the PDB name it takes you to another screen from where you manage the PDB. This is done in more or less the same way as you’d manage a non-CDB. Differences exist of course when it comes to visibility of information. You can expect to be presented only with the information you are allowed to see within the context of the PDB!
And it works with emcli too!
Enterprise Manager Command Line Interface (emcli) has support for PDBs as well, you can create them, plug and unplug etc. Here is an example how to create a PDB from a clone. If you refer back to the output of the last print screen you see a PDB named PDB1 in container database CDB1 on server2.example.com. I wanted to clone PDB1 to swingbench1 using the command line interface. The documentation is a bit sketchy at the moment and it is not terribly clear how to create a PDB from a “dbca-template” (at least to me) but I seem to have managed to initialise the creation of a PDB from a clone. On the OMS I ran the command:
[oracle@oem12oms1 ~]$ emcli create_pluggable_database \ > -cdbTargetName=CDB1 \ > -cdbTargetType=oracle_database \ > -cdbHostCreds=ORACLE_HOST \ > -pdbName=swingbench1 \ > -sourceType=CLONE \ > -cdbTargetCreds=LAB_SYS \ > -sourcePDBName=CDB1_PDB1 \ > -sourceCDBCreds=LAB_SYS \ > -sameAsSource Successfully submitted create database job. Procedure execution ID is: E5134C261D1127FBE043DE64A8C0D388
The execution of this requires the definition of named credentials (setup->security->named credentials). In this case I am using my host credentials ORACLE_HOST, and LAB_SYS to connect as sysdba. If you are unsure about the target names use emcli get_targets -targets=”oracle_database” followed by emcli get_targets -targets=”oracle_pdb” to list the databases as well as the PDBs.
After a little while the PDB will be created. Check enterprise->provisioning and patching->procedure activity for your job. Clicking on it gives you more information on what’s happening. In this case the procedure completed successfully:
This is nice because it’s repeatable, scriptable and does NOT require a password to be stored in the script!
[oracle@server2 ~]$ sqlplus / as sysdba SQL*Plus: Release 18.104.22.168.0 Production on Thu Aug 29 05:42:01 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 22.214.171.124.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics and Real Application Testing options SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB1 READ WRITE SWINGBENCH1 READ WRITE SQL>
Certain particularities such as CDB and PDB resource plans are well managed already. I can only recommend OEM 12c over 11.1, it feels so much better and the user interface is more modern too. Happy consolidation!
I have no idea about licensing these components-before you implement them make sure you are appropriately licensed for the feature. Which is actually true for all the blog posts here…