The document contains examples of SQL commands for managing pluggable databases in Oracle including creating, cloning, opening, closing, and dropping pluggable databases. It also shows commands for checking the status and size of databases.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views
Cloneing PDB in The Same Container
The document contains examples of SQL commands for managing pluggable databases in Oracle including creating, cloning, opening, closing, and dropping pluggable databases. It also shows commands for checking the status and size of databases.
Instance crcdb01_2 is running on node dat-efs-c04ora03 oracle@dat-efs-c04ora02 /home/oracle > srvctl status service -db crcdb01 Service crcdb01_srv is running on nodes: dat-efs-c04ora03
alter system set db_files=2000 scope=spfile;
show parameter db_files
select * from V$DATAFILE
alter session set container=cdb$root
select sum(bytes)/1024/1024 from V$DATAFILE [ check size of the pdb: ]
alter pluggable database RBSR1708_ORA12 open read only; ( Source Database should be opened in read only )
create pluggable database bank_g_n1 from ebank_g_s6 ( cloned completed )
creating pluggable databaes in different container:
create database link clonelink connect to username identified by DD using 'data-
efs-c04sca:1530/ppscdb01';
create pluggable database ebank_g_n1 from ebank_g_s6@clonelink;
create pluggable database bank_g_n1 from rbsr1708_ora12;
create pluggable database pdb1_clone from plugg1;
create pluggable database rbsr1708_ora13 from rbsr1708_ora12;