CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PDB12C READ WRITE NO 4 PDB4 READ WRITE NO
# 远端cdb sys@CDB1> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 4 PDB3 READ WRITE NO
现在测试将cdb1上的pdb3克隆到本地,先在远端cdb环境上创建用户,赋予创建pdb等权限
1 2 3 4 5 6 7
create user c#xb identified by xb container=all;
User created.
sys@CDB1> grant create session, create pluggable database to c#xb container=all;
Grant succeeded.
检查cdb1是否启用了归档和本地undo,因为只有这样源库就不需要关闭或置于read-only
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
col property_name format a20 col property_value format a20
select property_name, property_value from database_properties where property_name = 'LOCAL_UNDO_ENABLED';
sys@ORA12C> create pluggable database pdb3new from pdb3@to_remote;
Pluggable database created.
# alert.log create pluggable database pdb3new from pdb3@to_remote 2019-06-12T15:35:17.673517+08:00 Opatch validation is skipped for PDB PDB3NEW (con_id=5) 2019-06-12T15:35:33.731948+08:00 PDB3NEW(5):Endian type of dictionary set to little 2019-06-12T15:35:38.879320+08:00 **************************************************************** Pluggable Database PDB3NEW with pdb id - 5 is created as UNUSABLE. If any errors are encountered before the pdb is marked as NEW, then the pdb must be dropped local undo-1, localundoscn-0x00000000000000e1 **************************************************************** 2019-06-12T15:35:41.415426+08:00 Applying media recovery for pdb-4099 from SCN 17603364 to SCN 17603401 Remote log information: count-1 thr-1, seq-130, logfile-/u01/arch/cdb1/parlog_1_130_edf48e09_1006353729.arc, los-11406334, nxs-18446744073709551615 PDB3NEW(5):Media Recovery Start 2019-06-12T15:35:41.422985+08:00 PDB3NEW(5):Serial Media Recovery started 2019-06-12T15:35:42.538588+08:00 PDB3NEW(5):Media Recovery Log /u01/arch/cdb1/parlog_1_130_edf48e09_1006353729.arc 2019-06-12T15:35:42.915318+08:00 PDB3NEW(5):Incomplete Recovery applied until change 17603401 time 06/12/2019 15:35:39 2019-06-12T15:35:43.041389+08:00 PDB3NEW(5):Media Recovery Complete (ora12c) 2019-06-12T15:35:43.711336+08:00 PDB3NEW(5):Autotune of undo retention is turned on. 2019-06-12T15:35:45.886107+08:00 PDB3NEW(5):[95653] Successfully onlined Undo Tablespace 2. PDB3NEW(5):Undo initialization finished serial:0 start:4013286781 end:4013286842 diff:61 ms (0.1 seconds) PDB3NEW(5):Database Characterset for PDB3NEW is AL32UTF8 PDB3NEW(5):JIT: pid 95653 requesting stop 2019-06-12T15:35:48.606380+08:00 Completed: create pluggable database pdb3new from pdb3@to_remote