Description:-
In this article, I will elaborate on how we can cloning a PDB database in Same CDB using DBCA method
Environment:-
COLUMN DB_NAME FORMAT A10
COLUMN CON_ID FORMAT 999
COLUMN PDB_NAME FORMAT A15
COLUMN OPERATION FORMAT A16
COLUMN OP_TIMESTAMP FORMAT A10
COLUMN CLONED_FROM_PDB_NAME FORMAT A15
SELECT DB_NAME, CON_ID, PDB_NAME, OPERATION, OP_TIMESTAMP, CLONED_FROM_PDB_NAME
FROM CDB_PDB_HISTORY
WHERE CON_ID > 2
ORDER BY CON_ID;
Demo:-
Step:-1 Prepare the oradbwrpdb1 Before Cloning
[oracle@oracle21c ~]$ sqlplus scott/tiger@oradbwrpdb1
SQL*Plus: Release 21.0.0.0.0 – Production on Mon Sep 19 21:54:55 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Mon Sep 19 2022 21:54:43 +05:30
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 – Production
Version 21.3.0.0.0
SQL> create table test as select * from emp;
Table created.
SQL> select count(*) from test;
COUNT(*)
———-
14
Step:-2 Invoke dbca tool to create clone pdb database.
Step:-3 Select CDB Database Name.
Step:-4 Click create new pdb and choose the source pdb name
Step:-5 Enter the clone pdb name (enter pdbadmin password)
Step:-6 Click next
Step:-7 Verify the summary and click finish
Step:-8 Oracle 21c pdb database cloning in progress
Step:-9 Oracle pdb database Cloning is completed using dbca method
Step:-10 Validate the cloning oracle 21c pdb database.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
———- —————————— ———- ———-
2 PDB$SEED READ ONLY NO
3 ORADBWRPDB1 READ WRITE NO
4 ORADBWRPDB2 READ WRITE NO
[oracle@oracle21c admin]$ sqlplus scott/tiger@oradbwrpdb2
SQL*Plus: Release 21.0.0.0.0 – Production on Mon Sep 19 22:33:57 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Mon Sep 19 2022 21:54:55 +05:30
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 – Production
Version 21.3.0.0.0
SQL> select count(*) from test;
COUNT(*)
———-
14
Connect with me on:-
Telegram App:https://t.me/oracledbwr
LinkedIn:https://www.linkedin.com/in/hariprasathdba
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page : https://www.facebook.com/dbahariprasath/?
Twitter : https://twitter.com/hariprasathdba