本文使用的是asm,不适用于文件系统,克隆前最好将PDB1_WHS修改为readonly状态,我这里是测试环境,就不改了。
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1_WHS READ WRITE NO
SQL> create pluggable database PDB2_WHS from PDB1_WHS;
Pluggable database created.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1_WHS READ WRITE NO
4 PDB2_WHS MOUNTED
SQL> alter pluggable database PDB2_WHS open;
Pluggable database altered.