Description:-
In this article we are going to see how to cloning a PDB Database Using Sqldeveloper Tool.
Environment:-
Demo:-
Step:-1
You will be connecting to the root multitenant container database (CDB). The root container is where you can manage the pluggable databases (PDB). Enter the parameters for the new connection. In this example, the entries are:
Name: sys
Username: sys
Password: Enter the password for your system.
Save Password: Selected
Connection Type: Basic
Role: SYSDBA
Hostname: 192.168.1.24
Port: 1521
SID: orcl
Click Test and confirm a status of “Success.”
Step:-2 Prepare the oradbwrpdb1 Before Cloning
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 ~]$ sqlplus scott/tiger@oradbwrpdb1
SQL*Plus: Release 21.0.0.0.0 – Production on Tue Sep 20 15:58:01 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> create table sqldev as select * from emp;
Table created.
SQL> select count(*) from sqldev;
COUNT(*)
———-
14
Step:-3 Adding a Connection to the DBA Navigator
Choose DBA from the View menu: View –> DBA
Step:-4 Connect to sqldeveloper tool to create clone pdb database.
You can create additional pluggable databases by cloning an existing pluggable database. Perform the tasks below to create a clone of ORADBWRPDB1 named ORADBWRPDB3.
Expand the sys node and then the Container Database node.
Step:-4 Click Clone PDB
On the Properties tab, provide the parameters for cloning. In this example, the parameters are:
Clone Database Name: oradbwrpdb3
Source PDB: oradbwrpdb1
Storage: Unlimited
Open automatically : select
Step:-5 Click apply oracle 21c pdb database cloning is completed using sqldeveloper tool
Database ready for use !!!
Step:- 5 perform post clone steps to connect to the pdb database
Add tns entry
ORADBWRPDB3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.24)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oradbwrpdb3)
)
[oracle@oracle21c admin]$ lsnrctl status |grep -i oradbwrpdb3
Service “oradbwrpdb3” has 1 instance(s).
Step:- 6 Validate the cloning oracle 21c pdb database using sqldeveloper tool.
[oracle@oracle21c ~]$ sql
SQL*Plus: Release 21.0.0.0.0 – Production on Tue Sep 20 16:31:12 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 – Production
Version 21.3.0.0.0
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
5 ORADBWRPDB3 READ WRITE NO
[oracle@oracle21c ~]$ sqlplus scott/tiger@oradbwrpdb3
SQL*Plus: Release 21.0.0.0.0 – Production on Tue Sep 20 16:31:51 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Last Successful login time: Tue Sep 20 2022 15:58:01 +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 sqldev;
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