首页 > 代码库 > ORACLE 12.1.0.1 至12.1.0.2升级文档(单机版 DBUA方式)

ORACLE 12.1.0.1 至12.1.0.2升级文档(单机版 DBUA方式)

12C DBUA新特性

1. 新的pre-upgrade 检查工具.

2. 并行升级.

3. DBUA升级时,默认并行度为CPU个数或2. 并行度可调整.

4. 在升级过程中,DBUA工具可再次调用(restarted).

5. 更详细的日志来监控升级的进度.

6. CDB 和 PDB 同时都会升级.

7. listener 会迁移至新的版本中.

8. 所有的数据文件和临时文件会更改为自动扩展.

 

如下,着重讲一下12c的pre-upgrade 检查工具:

具体参考MOS: How to Download and Run Oracle‘s Database Pre-Upgrade Utility (Doc ID 884522.1)

注意:

1、如果是CDB环境,则需要所有的PDB置于READ,WRITE状态.

2、如果是CDB环境,升级前检查脚本必须在CDB和PDB都执行.

 

SQL> show pdbs;

 

CON_ID CON_NAME OPEN MODE RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED READ ONLY NO

3 PDB1 READ WRITE NO

4 PDB2 READ WRITE NO

5 PDB3 READ WRITE NO

SQL>

 

执行升级前检查脚本方法一(catcon.pl):

Oracle has provided script catcon.pl to execute scripts at Container and Pluggable database at once. In a CDB, the catcon.pl script is the best way to run SQL scripts and SQL statements. It can run them in the root and in specified PDBs in the correct order, and it generates log files.

 

The catcon.pl script is a Perl script that must be run at an operating system prompt.

If Neither the -c nor the -C parameter is specified, then catcon.pl runs the script in all containers by default.

 

[oracle@12cdb01 admin]$ cd $ORACLE_HOME/rdbms/admin

[oracle@12cdb01 admin]$ $ORACLE_HOME/perl/bin/perl catcon.pl -d /u01/software/precheck -l /home/oracle -b preupgrade_log_base_name preupgrd.sql

[oracle@12cdb01 admin]$

 

脚本生成的日志:

[oracle@12cdb01 ~]$ cd /home/oracle

[oracle@12cdb01 ~]$ ll

total 20

-rw-r--r-- 1 oracle oinstall 5092 Nov 26 18:14 preupgrade_log_base_name0.log

-rw-r--r-- 1 oracle oinstall 2822 Nov 26 18:14 preupgrade_log_base_name1.log

-rw-r--r-- 1 oracle oinstall 2822 Nov 26 18:14 preupgrade_log_base_name2.log

-rw-r--r-- 1 oracle oinstall 2822 Nov 26 18:14 preupgrade_log_base_name3.log

[oracle@12cdb01 ~]$

 

执行升级前检查脚本方法二(分别进入所有容器):

 

$ sqlplus "/ as sysdba"

sql> <Location of preupgrade scripts>/preupgrd.sql

 

sql> alter session set container=<PDB_Name>;

sql> <Location of preupgrade scripts>/preupgrd.sql

 

sql> alter session set container=<PDB_Name>;

sql> <Location of preupgrade scripts>/preupgrd.sql

 

整个升级文档太大,不放在该blog中,如有需要,请点击链接下载:

http://files.cnblogs.com/files/missyou-shiyh/upgraded_to_12.1.0.2_using_dbua.rar

ORACLE 12.1.0.1 至12.1.0.2升级文档(单机版 DBUA方式)