Tuesday, August 27, 2013

Post 12c Upgrade - Converting Non-CDB as PDB

The upgrade process is getting fine tuned on every release and in 12c we are getting a much better features. A lot of automation has been put in the 12c upgrade process. The pre-upgrade phase has now more validation with the apply action option where the assistance generates a fix script and that can be run to fix the issues. If you have more CPU cores and want to make use of it then 12c upgrade assistance has an answer for it. Assistance allows you to select the parallelism which will speed up the upgrade process. 




Now we have a database upgraded to 12c from 11g. The upgraded database is not a PDB it is a NON-CDB. I will go ahead and convert into a PDB.

So the process is simple , from the 12c Oracle Home start DBCA and create a CDB Instance with one PDB. Then you have all the necessary setup for the migration. Now with few simple steps one can migrate to the CDB instance. 

In this demo my Non-CDB name is UPGDB and the newly created CDB instance name is UPGCDB , it has one PDB named PDB001 and will later add UPGDB into the CDB as a PDB.






With the new CDB created let us start adding the UPGDB (Non-CDB) into it.

Startup the Non-CDB database and make sure that you also have the CDB running.


Now connect to the Non-CDB and use the PDB Describe package to create the xml file with all the necessary information. You can take a look at the xml file and understand its internal specifications.


Review the xml file and Shutdown the Non-CDB database


Now connect to the CDB database and use the dbms_pdb database package to check the compatibility of the Non-CDB database by passing the xml file generated.


Use the pdb_plug_in_violations view to know the status.


Refer to Oracle 12c upgrade guide for any errors reported.

Now issue the create pluggable database command using the xml file with COPY option.
COPY option will copy the data files to the new location , if you do not want to then use the MOVE option which will move the data files. If you want to retain the data files in the same location then use NOCOPY option. The default one is COPY.



Once the PDB is created make sure that there are no errors in the alert.log


Verify the status of the new PDB , it is NEW. Now run the noncdb_to_pdb.sql to integrate the converted PDB into the container CDB.


Open the PDB to complete the integration.


Verify the same from alert log.


Check the pdb_plug_in_violations view to make sure that the Non-CDB to PDB has RESOLVED status.


 With this we have successfully converted Non-CDB to PDB

Later you can invoke DBCA to delete the Non-CDB entries.



Popular Posts