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>
|