Multitenant : Hot Clone a Remote PDB or Non-CDB in Oracle Database 12c Release 2 (12.2)
https://oracle-base.com/articles/12c/multitenant-hot-clone-remote-pdb-or-non-cdb-12cr2
Multitenant : Clone a Remote PDB or Non-CDB in Oracle Database 12c (12.1.0.2)
https://oracle-base.com/articles/12c/multitenant-clone-remote-pdb-or-non-cdb-12cr1
on remote source CDB:
SQL> alter session set container=CRMDB;
Session altered.
SQL> create user dblk identified by welcome123;
User created.
SQL> grant create session,create pluggable database to dblk;
Grant succeeded.
SQL> alter pluggable database CRMDB close;
Pluggable database altered.
SQL> alter pluggable database CRMDB open read only;
Pluggable database altered.
on local destination CDB:
REMTPDB=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.22.140)(PORT=1523))
(CONNECT_DATA=
(SERVICE_NAME=crmdb.test.com)
)
)
SQL> create database link clone_link connect to dblk identified by welcome123 using 'REMTPDB';
Database link created.
SQL> desc SIEBEL.user_tables@clone_link;
...
SQL> create pluggable database CRMIP from CRMDB@clone_link; ---- CRMDB is the name of destination PDB
Pluggable database created.
SQL> select name,open_mode from v$pdbs where name='CRMIP';
NAME OPEN_MODE
------------------------------ ----------
CRMIP MOUNTED
SQL> alter pluggable database CRMIP open;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs where name='CRMIP';
NAME OPEN_MODE
------------------------------ ----------
CRMIP READ WRITE
check whether role and privs are cloned to PDB:
SQL> select * from user_role_privs where username='SIEBEL';
USERNAME GRANTED_ROLE ADM DEL DEF OS_ COM
--------------------------------------------------------------------------------
SIEBEL DBA NO NO NO NO NO
SIEBEL SSE_ROLE NO NO YES NO NO
SIEBEL TBLO_ROLE NO NO YES NO NO