oracle 12c使用dblink克隆pdb

it2022-05-07  25

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-12cr2Multitenant : 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-12cr1on 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 PDBPluggable database created.SQL> select name,open_mode from v$pdbs where name='CRMIP';NAME       OPEN_MODE------------------------------ ----------CRMIP       MOUNTEDSQL> alter pluggable database CRMIP open;Pluggable database altered.SQL> select name,open_mode from v$pdbs where name='CRMIP';NAME       OPEN_MODE------------------------------ ----------CRMIP       READ WRITEcheck 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 NOSIEBEL                    SSE_ROLE                 NO  NO YES NO NOSIEBEL                    TBLO_ROLE               NO  NO YES NO NO

转载于:https://www.cnblogs.com/Clark-cloud-database/p/7813687.html

相关资源:垃圾分类数据集及代码

最新回复(0)