Oracle 12c nocdb
转换成cdb
环境说明:
OS:Oracle Linux Server release 6.3
DB:Oracle 12.2.0.1.0
DBName:dapuchai
场景:
Oracle 11.2.0.4.0
升级到Oracle 12.2.0.1.0
,默认是no-cdb
模式,升级后根据需要将no-cdb
转换成cdb
里,即将之前的11.2.0.4.0
数据完全迁移到PDB(Creating a PDB Using a Non-CDB)
;
实施方案:
一:
连接non-CDB(dapuchai)
,生成XML
格式数据库描述文件
二:DBCA
新建cdb
数据库(cjcdb)
三:
Plug in the non-CDB (cjcpdb)
四:执行
noncdb_to_pdb.sql
五:验证数据
参考:
一:
连接
non-CDB(dapuchai)
,生成
XML
格式数据库描述文件
Connect to the non-CDB, and run the
DBMS_PDB.DESCRIBE
procedure to construct an XML file that describes the non-CDB.
[root@cjc ~]# ps -ef|grep pmon
oracle 2677 1 0 22:35 ? 00:00:00
ora_pmon_dapuchai
root 3057 2634 0 22:37 pts/1 00:00:00 grep pmon
SQL> select name,cdb from v$database;
NAME CDB
--------- ---
DAPUCHAI NO
SQL> show pdbs
SQL> show con_id
CON_ID
------------------------------
0
SQL> shutdown immediate
---只读方式打开dapuchai数据库
SQL> startup open read only;
SQL> select name,open_mode,cdb from v$database;
NAME OPEN_MODE CDB
--------- -------------------- ---
DAPUCHAI READ ONLY NO
---生成xml
格式的数据库描述文件
SQL> BEGIN
DBMS_PDB.DESCRIBE(pdb_descr_file => '/home/oracle/20200113.xml');
END; 2 3
4 /
PL/SQL procedure successfully completed.
二:
DBCA
新建