本帖最后由 郑全 于 2023-8-6 17:57 编辑
比如在CDB1中创建一个代理proxy_pdb1 ,引用ORCLCDB中PDB1
步骤如下;
1.在orclcdb中,创建通用用户,有CREATE SESSION,SYSOPER通用权限
create user c##remote_user identified by oracle_4U container=all;
grant create session , sysoper
to c##remote_user
container=all;
2.在cdb1 中创建DBLINK
create database link link_cdb1
connect to c##remote_user identified by oracle_4U
using '192.168.133.134:1521/orclcdb';
3.在cdb1中,创建proxy pdb
create pluggable database proxy_pdb1 as proxy from pdb1@link_cdb1;
4.验证:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
4 PROXY_PDB1 READ WRITE NO
。。。
SQL>
1* select PDB_NAME,IS_PROXY_PDB from cdb_pdbs
PDB_NAME IS_
------------------------------ ---
。。
PXPDB1 YES
。。。
|