使用已有PDB克隆PDB
Posted 王超元
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用已有PDB克隆PDB相关的知识,希望对你有一定的参考价值。
使用已有PDB克隆PDB $ sqlplus ‘/as sysdba‘ SQL*Plus: Release 12.1.0.1.0 Production on Tue Jun 23 13:46:53 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> show con_name; CON_NAME ------------------------------ CDB$ROOT SQL> select con_id,name,open_mode,restricted from v$pdbs order by 1; CON_ID NAME OPEN_MODE RES ---------- ------------------------------ ---------- --- 2 PDB$SEED READ ONLY NO 3 YB MOUNTED 4 YB1 MOUNTED SQL> alter session set container=yb; Session altered. #用来克隆的pdb必须是以read only模式打开 SQL> startup open read only; Pluggable Database opened. SQL> alter session set container=CDB$ROOT; Session altered. SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> create pluggable database clonedb from yb file_name_convert=(‘/u12/app/oracle/oradata/ora12/yb/‘,‘/u12/app/oracle/oradata/ora12/clonedb/‘); Pluggable database created. SQL> select con_id,name,open_mode,restricted from v$pdbs order by 1; CON_ID NAME OPEN_MODE RES ---------- ------------------------------ ---------- --- 2 PDB$SEED READ ONLY NO 3 YB READ ONLY NO 4 YB1 MOUNTED 5 CLONEDB MOUNTED SQL>
以上是关于使用已有PDB克隆PDB的主要内容,如果未能解决你的问题,请参考以下文章