Vous êtes sur la page 1sur 15

How to plugin a non-CDB

database to a Container
Database (CDB)
Osama Mustafa
@OsamaOracle
Oracle ACE Director

Osama Mustafa is Founder of Gurus Solutions Company, Oracle ACE Director , Creator/Director of Jordan Amman Oracle
User Group the first Group in Jordan related to oracle technology,Author of the book Oracle Penetration Testing, Osama
has been working on project and customer support in EMEA Region, Providing Database Implementation Solutions, his
specialties Fusion middleware, In memory database Timesten, Exalytics and Exalogic machine, Include to this Osama Is
frequently Speaker in Oracle User Groups around the world and one of RAC ATTACK event organizer, Fusion middleware
ATTACK Organizer as well, he published articles in Oracle Magazine, OTECH magazine and UKOUG Oracle Scene magazine,
Also he is Blogger and Certified Oracle Database and Fusion middleware, he assists with sharing his knowledge at
conferences, webinars, white papers ,slide share and blog posts to the Oracle community, Simply he is Oracle passionate.

Steps to do this
1. Setting Non-CDB to Read Only
Mode.
2. Generate a pluggable database
manifest file for Non-CDB.
3. Create and Plug in PDB into CDB2 by
using manifest file ( from Step #2).
4. Optional :- Convert to PDB data
dictionary.
5. Test the environment.

Tips before you start


Ensure that you have enough disk
space to hold a second copy of the
non-CDB.
Make sure that environment set
correctly.
This should be done in Oracle 12c.

in depth technical
Connect to the noncdb instance.
sqlplus / as sysdba
shutdown immediate
startup mount exclusive
alter database open read only;

in depth technical
Execute the dbms_pdb.describe
procedure to generate the manifest
file.
exec
dbms_pdb.describe(pdb_descr_file=>'/u
01/app/oracle/noncdb/noncdb.xml');

Shutdown the Non-CDB to prepare to


copy the data files.
shutdown immediate

in depth technical
Now Connect tocdb2.
Create a PDB by using the noncdb
manifest file. Use the
file_name_convert parameter to
place the copied data files in a
different location.
create pluggable database exnoncdb as
clone using
'/u01/app/oracle/noncdb/noncdb.xml'
file_name_convert=('/u01/app/oracle/ora
data/noncdb','/u01/app/oracle/oradata/n

in depth technical
Finalize the plug-in by opening the
new PDB, closing it, and then
reopening it.
alter pluggable database newnoncdb
open;
alter pluggable database newnoncdb
close;
alter pluggable database newnoncdb
open;
exit

in depth technical
This step is optional.
Without this step the new PDB cloned
from the non-CDB will work fine.
if you need to upgrade the CDB later,
you should run the
noncdb_to_pdb.sql script to remove
superfluous non-CDB data from the
PDB data dictionary
Regarding to oracle documentation
its recommended in a production

in depth technical
This step is optional.
Connect to the new newnoncdb PDB.
sqlplus sys/oracle@localhost:1521/exnoncdb
as sysdba
@$ORACLE_HOME/rdbms/admin/noncdb_to_
pdb.sql

Finally Test
Make sure everything is working fine.
Test your new PDB by reset/bounce
DB.
alter pluggable database newnoncdb
close immediate;
Alter Pluggable database newnoncdb
open;
OR
Alter Pluggable database all open;

Using EM12c

Using EM12c

Using EM12c

Using EM12c

Using EM12c

Vous aimerez peut-être aussi