How to Clone an existing
pluggable database in Oracle 12c.
Step 1:-
Verify all the databases present in the system.
Select name,pdb from v$services
NAME
PDB
--------
----------
SYS$BACKGROUND CDB$ROOT
SYS$USERS CDB$ROOT
TESTPDB
PDB.DOMAIN.COM
Let’s follow the below steps to clone the PDB “TESTPDB” to “TESTPDB_CP”.
Step 2:-
Close the pluggable database TESTPDB.
Sql > Alter pluggable
database TESTPDB close
Step 3:-
Open the pluggable database TESTPDB in
read only mode.
Sql > Alter pluggable
database TESTPDB open read only
Step 4:-
Create the new pluggable database TESTPDB_CP
from the pluggable database TESTPDB.
Sql > create pluggable
database TESTPDB_CP from TESTPDB
file_name_convert = (‘/TESTPDB’,’/TESTPDB_CP’)
Step 5:-
Open the source pluggable database TESTPDB
in read write mode.
Sql > Alter pluggable
database TESTPDB open
Step 6:-
Open the new pluggable database TESTPDB_CP
in read write mode.
Sql > Alter pluggable
database TESTPDB_CP open
Step 7:-
Now we can check the status of all the PDB’s.
Select name,pdb from v$services;
No comments:
Post a Comment