12c:将一个CDB的所有PDB,导入到另一个CDB中
本文一样是读书时的练习:
开始前,说明下:
在我的环境中有两个CDB:
源:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
[oracle@rhel7 trace]$ env | grep SID ORACLE_SID=conme [oracle@rhel7 trace]$ [oracle@rhel7 trace]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sat Apr 23 13:41:52 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> select name,cdb from v$database; NAME CDB --------- --- CONME YES SQL> SQL> select con_id,name,open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY 3 PDBME MOUNTED 4 PDBSHE MOUNTED 5 PDBSHE2 MOUNTED 6 PDBORCL MOUNTED SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [oracle@rhel7 trace]$ |
目标:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
[oracle@rhel7 controlfile]$ env | grep SID ORACLE_SID=callah [oracle@rhel7 controlfile]$ [oracle@rhel7 controlfile]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sat Apr 23 13:42:40 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> SQL> select name,cdb from v$database; NAME CDB --------- --- CALLAH YES SQL> SQL> select con_id,name,open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [oracle@rhel7 controlfile]$ |
在源端操作:
Unplug PDB:
[cray[……]