Use an existing PDB clone pdb$ sqlplus '/as sysdba ' sql*plus:release 12.1.0.1.0 Production on Tue June 13:46:53 2015Copyright (c) 1982, 2 013, Oracle. All rights reserved. Connected to:oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit productionwith The partitioning, OLAP, Adva nced Analytics and Real application testing optionssql> show Con_name; Con_name------------------------------cdb$rootsql> 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 Mountedsql> alter session set CONTAINER=YB; Session altered. #用来克隆的pdb必须是以read only mode to open sql> startup open Read only; Pluggable Database opened. Sql> alter session set Container=cdb$root; Session altered. Sql> Show Con_namecon_name------------------------------cdb$rootsQl> 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 mountedsql>
Using an existing PDB to clone a PDB