DBCA – Delete a Pluggable Database
Now that Oracle Database 12c has been out for a few months, there has been a lot of information being written about in regards to the multi-tenant database features. Although multi-tenant databases will allow us to do more with less resources there will be times when a pluggable database will need to be removed. In this blog post, I want to show you how easy it is to delete a pluggable database using the Database Configuration Assistant (DBCA).
Before we can delete a pluggable database with DBCA, we need to set our environment. I normally use the oraenv command to set my environments. This makes it a bit easier (less typing) than setting the environment manually also a good practice before working 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
Before we start the DBCA, we need to see what pluggable databases are available within the consolidated database (CDB). This information can be gained from the V$PDBS view.
SQL> select name, open_mode from v$pdbs;NAME OPEN_MODE
-------------------- ----------
PDB$SEED READ ONLY
PDB1 READ WRITE
PDBTEST MOUNTED
PDB2 MOUNTED
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. Select this radio button and then click next.
[oracle@oel dbhome_1]$ dbca & [1] 8853
On the Manage Pluggable Databases (step2), we see there are a lot of options for managing a pluggable database. For the purpose of this post, we want to delete a pluggable database. Select the radio button for deleting a pluggable database.
The Database List (step 3) will give us the list of Oracle Database 12c Container Databases that we would like to delete the pluggable database from. Select the 12c database that you would like to delete the pluggable from. In this example, I’m going to use the ora12c database.
After selecting the db12c database that we want to delete the pluggable database from, we will be on the Delete Pluggable Database (step 4) screen. On this screen we see a drop down box that will present a list of pluggable databases that can be deleted. Select the PDB that we want to delete.
After we selected the PDB to delete, DBCA puts us on a summary screen which explains what we are about to remove. This screen listed the CDB that is doing to affected and which PDB with associated data files that will be deleted.
As with other processes within DBCA, we are presented with a Progress Page that will show us the progress of the PDB being removed.
Once the PDB has been deleted, the DBCA will return a successful message.
After clicking OK, we can verify that the PDB was deleted by looking at the V$PDBS view within the database.
SQL> select name, open_mode from v$pdbs;NAME OPEN_MODE
-------------------- ----------
PDB$SEED READ ONLY
PDBTEST MOUNTED
PDB2 MOUNTED
I know this was a quick post, but hopefully, it is one that everyone can use if they want to remove a PDB from a CDB.
Enjoy!
twitter: @curtisbl294
blog: http://dbasolved.com
Current Oracle Certs
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.
It is also indicated for adults with adult onset growth hormone deficiency, either alone or associated with multiple hormone deficiencies hypopituitarism, as a result of pituitary disease, hypothalamic disease, surgery, radiation therapy, or trauma buy priligy 60 atorvastatin gentle laxative bisacodyl 5 mg dosage Before the game, Alderson explained that the Mets passed on making trade deadline moves, mostly for outfielder Marlon Byrd, because he liked the way the team has been playing over the last month and a half
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.