重庆思庄Oracle、Redhat认证学习论坛
标题: 从当前cdb中一个 pdb复制另一个pdb [打印本页]
作者: 郑全 时间: 2019-2-10 00:09
标题: 从当前cdb中一个 pdb复制另一个pdb
1.查看当前pdb情况
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ERP READ WRITE NO
4 CRM READ WRITE NO
2.从crm克隆一个mes pdb
SQL> create pluggable database mes from crm file_name_convert=('crm','mes');
Pluggable database created.
3.验证一下:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ERP READ WRITE NO
4 CRM READ WRITE NO
6 MES MOUNTED
SQL> alter session set container=mes;
Session altered.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/sztech1/mes/system01.dbf
/u01/app/oracle/oradata/sztech1/mes/sysaux01.dbf
/u01/app/oracle/oradata/sztech1/mes/undotbs01.dbf
/u01/app/oracle/oradata/sztech1/mes/users01.dbf
SQL> alter session set container=crm;
Session altered.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/sztech1/crm/system01.dbf
/u01/app/oracle/oradata/sztech1/crm/sysaux01.dbf
/u01/app/oracle/oradata/sztech1/crm/undotbs01.dbf
/u01/app/oracle/oradata/sztech1/crm/users01.dbf
SQL>
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |