Here we are going to see about how to clone a local Pluggable database in simple steps,
Pluggable Database Name- PDB1
Step 1:
Check the available Pluggable Database in the Container Database by issuing the below command
SQL> select name,open_mode from v$pdbs order by name;
NAME OPEN_MODE
——————– ———-
PDB1 READ WRITE
Step 2:
Switching the Source PDB to READ only mode
SQL> alter pluggable database PDB1 close;
SQL> alter pluggable database PDB1 open read only;
SQL> select name,open_mode from v$pdbs order by name;
Step 3:
We can create a new pluggable database as a copy of our existing PDB
Note :
1)we need to ensure the Source PDB in read-write mode
2)Operations are not allowed within the database so we need to connect as sys
SQL> alter pluggable database pdb1 open read write;
SQL> create pluggable database pdb2 from pdb1;
As a result of the previous command, PDB2 is created
Step 4:
Verifying the created PDB,
SQL> select con_id,name,open_mode from v$Pdbs;
Step 5:
Similarly, we can alter the cloned pluggable database as a read-write mode