linux Oracle_RAC資料庫GI的PSU升級(11.2.0.4.0到11.2.0.4.8)

531968912發表於2016-04-25

Oracle_RAC資料庫GI的PSU升級(11.2.0.4.0到11.2.0.4.8)

 資料庫 PSU,SPU(CPU),Bundle Patches 和 Patchsets 補丁號碼快速參考 (Doc ID 1922396.1) 
 Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets (Doc ID 1454618.1) 


本次演示為升級oracle rac資料庫,用GI的psu升級,從11.2.0.4.0升級到11.2.0.4.8。

演示環境:

兩個節點:rac1、rac2

GI的PSU升級包(11.2.0.4.8):p21352635_112040_Linux-x86-64.zip

解壓縮後的目錄:/setup/oracleUp/21523375

grid的$GRID_HOME:/u01/app/11.2.0/grid

oracle的$ORACLE_HOME:/u01/app/oracle/product/11.2.0/db_1

一:升級OPatch

下載最新的opatch程式並替換GI_HOME和ORACLE_HOME下的OPatch目錄

注意:rac1和rac2兩個節點的grid和oracle都要升級OPatch版本

到OPatch目錄下:

[oracle@rac1 db_1] $ pwd

/u01/app/oracle/product/11.2.0/db_1

備份之前的OPatch目錄:

[oracle@rac1 db_1] $ mv OPatch/  OPatch_20151116/

解壓縮下載的最新的OPatch版本:

[oracle@rac1 db_1]$ unzip p6880880_112000_Linux-x86-64.zip

檢視opatch版本,已升級到最新的11.2.0.3.12版本

[oracle@rac1 db_1] $ cd OPatch/

[oracle@rac1 OPatch] $ ./opatch version

OPatch Version: 11.2.0.3.12

OPatch succeeded.

二:生成ocm檔案

在rac1和rac2分別生成ocm.rsp檔案。

[oracle@rac1 psu]$ pwd

/u01/app/oracle/psu

[oracle@rac1 psu]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/ocm/bin/emocmrsp

[oracle@rac1 psu]$ ls

ocm.rsp

三:給GRID_HOME安裝補丁

1、rac1:

root使用者執行
[root@rac1 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/11.2.0/grid/  -ocmrf /u01/app/oracle/psu/ocm.rsp

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /setup/oracleUp -patchn 21523375 -oh /u01/app/11.2.0/grid/ -ocmrf /u01/app/oracle/psu/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-11-16_15-39-09.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2015-11-16_15-39-09.report.log

2015-11-16 15:39:09: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping CRS...

Stopped CRS successfully

patch /setup/oracleUp/21523375/21352635  apply successful for home  /u01/app/11.2.0/grid

patch /setup/oracleUp/21523375/21352649  apply successful for home  /u01/app/11.2.0/grid

patch /setup/oracleUp/21523375/21352642  apply successful for home  /u01/app/11.2.0/grid

Starting CRS...

Installing Trace File Analyzer

CRS-4123: Oracle High Availability Services has been started.

opatch auto succeeded.


2、上述執行完畢後,再在rac2上執行:

root使用者執行
[root@rac2 ~]# /u01/app/11.2.0/grid/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/11.2.0/grid/  -ocmrf /u01/app/oracle/psu/ocm.rsp

四:給DB HOME安裝補丁集

1、rac1:

root使用者執行
[root@rac1 ~]# /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /u01/app/oracle/psu/ocm.rsp

Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /setup/oracleUp -patchn 21523375 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /u01/app/oracle/psu/ocm.rsp -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-11-16_16-31-45.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2015-11-16_16-31-45.report.log

2015-11-16 16:31:45: Starting Clusterware Patch Setup

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ...

Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully

patch /setup/oracleUp/21523375/21352635  apply successful for home  /u01/app/oracle/product/11.2.0/db_1

patch /setup/oracleUp/21523375/21352649/custom/server/21352649  apply successful for home  /u01/app/oracle/product/11.2.0/db_1

Starting RAC /u01/app/oracle/product/11.2.0/db_1 ...

Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully

opatch auto succeeded.

2、上述執行完畢後,再在rac2上執行:

root使用者執行
[root@rac2 ~]# /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /setup/oracleUp/21523375 -oh /u01/app/oracle/product/11.2.0/db_1 -ocmrf /u01/app/oracle/psu/ocm.rsp

五:更新dba_registry_history檢視資訊

[oracle@rac1 ~]$ sqlplus / as sysdba

SQL> @?/rdbms/admin/catbundle.sql psu apply

確認升級後的dba_registry_history檢視:

SQL> select action,comments from registry$history;

ACTION  COMMENTS

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

APPLY    Patchset 11.2.0.2.0

APPLY    PSU 11.2.0.4.8

2 rows selected.

六:檢查GI及oracle版本

檢視rac1和rac2兩個節點的GI和oracle版本,下面以rac1為例

檢視GI版本,已升級到11.2.0.4.8

檢視oracle版本,已升級到11.2.0.4.8

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25462274/viewspace-2087607/,如需轉載,請註明出處,否則將追究法律責任。

相關文章