Oracle 11g RAC手動打GI PSU補丁(11.2.0.4.8)

來源:互聯網
上載者:User

Oracle 11g RAC手動打GI PSU補丁(11.2.0.4.8)
一、準備工作1,資料庫環境

作業系統版本  : RedHat 6.5 x64  
資料庫版本    : Oracle 11.2.0.4 x64 RAC    
Grid          : 11.2.0.4    
Oracle database: 11.2.0.4

2,準備內容

GI PSU : p21523375_112040_Linux-x86-64.zip    
OPatch : p6880880_112000_Linux-x86-64.zip    
DB PSU : p21352635_112040_Linux-x86-64.zip 僅單一實例使用。

OPatch:  
https://updates.oracle.com/download/6880880.html

說明:GI PSU包括DB PSU,CPU。

二、更新OPatch版本,必須要更新

說明:分別在兩個節點更新OPatch版本。

1. 更新OPatch版本,需要更新到11.2.0.3.11,OPatch直接壓縮替換就可以了。

(1) 上傳p6880880_112000_Linux-x86-64.zip到/u01/software目錄下, /u01/software給777許可權,也可以採用/tmp目錄。  
(2) root使用者下將原OPatch目錄改名。

mv /u01/app/11.2.0/grid/OPatch /u01/app/11.2.0/grid/OPatchbk  
mv /u01/app/oracle/product/11.2.0/db_1/OPatch /u01/app/oracle/product/11.2.0/db_1/OPatchBK

2. grid目錄OPatch替換

(1) root使用者  
cd /u01/software/;chown grid:oinstall p6880880_112000_Linux-x86-64.zip

(2) grid使用者

su - grid  
cd /u01/software/    
unzip p6880880_112000_Linux-x86-64.zip

(3) root使用者

cd /u01/software/  
mv OPatch /u01/app/11.2.0/grid/

(4) grid使用者測試

su - grid  
/u01/app/11.2.0/grid/OPatch/opatch version

OPatch Version: 11.2.0.3.11  
OPatch succeeded.

3. oracle目錄OPatch替換

(1) root使用者

cd /u01/software/;chown oracle:oinstall p6880880_112000_Linux-x86-64.zip

(2) oracle使用者

su - oracle  
cd /u01/software/    
unzip p6880880_112000_Linux-x86-64.zip

(3) root使用者

cd /u01/software/  
mv OPatch /u01/app/oracle/product/11.2.0/db_1/

(4) oracle使用者測試

su - oracle

/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version

OPatch Version: 11.2.0.3.11  
OPatch succeeded.

 

三、開始升級GI PSU軟體包1. 前提

(1) root使用者下打grid需要關閉grid(兩節點都執行)

cd /u01/app/11.2.0/grid/bin  
./crsctl stop has

2. grid使用者下解決GI PSU補丁包

(1) root使用者操作

cd /u01/software/;chown grid:oinstall p21523375_112040_Linux-x86-64.zip

(2) grid使用者操作

su - grid  
cd /u01/software/;unzip p21523375_112040_Linux-x86-64.zip

3. grid使用者下測試相容性,針對多次打CPU的環境中。

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352649 -oh $ORACLE_HOME    
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352642 -oh $ORACLE_HOME    
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352635 -oh $ORACLE_HOME

----------------------------------------------------  
執行樣本如下:    
Oracle Interim Patch Installer version 11.2.0.3.11    
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home      : /u01/app/11.2.0/grid  
Central Inventory : /u01/app/oraInventory    
  from          : /u01/app/11.2.0/grid/oraInst.loc    
OPatch version    : 11.2.0.3.11    
OUI version      : 11.2.0.4.0    
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2015-12-18_16-21-46PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.  

四、開始升級GRID1. 依次節點1,節點2上人執行。

第1步: 執行指令碼, 一定要執行,否則無法成功,確保CRS是關閉狀態。

也可以先查看補丁包中的README檔案。

[root@db1 bin]# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock

Using configuration parameter file: /grid/grid_home/crs/install/crsconfig_params    
CRS-4544: Unable to connect to OHAS    
CRS-4000: Command Stop failed, or completed with errors.    
Successfully unlock /grid/grid_home

[root@db1 bin]#

第2步:下載補丁包(目前11.2.0.4.8 PSU),準備升級

su - grid

/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352649  
/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352642    
/u01/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352635

過程中按三個Y

 

2. 檢查升級情況

$ /u01/app/11.2.0/grid/OPatch/opatch lsinv   
                                                   
Patch  21352635    : applied on Fri Dec 18 17:38:24 CST 2015    
Unique Patch ID:  19227862    
Patch description:  "Database Patch Set Update : 11.2.0.4.8 (21352635)"    
  Created on 1 Sep 2015, 07:49:44 hrs    
Sub-patch  20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"    
Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"    
Sub-patch  19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"    
Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"    
Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"    
Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"    
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"    
  Bugs fixed:    
...

$ /u01/app/11.2.0/grid/OPatch/opatch lspatches

21352635;Database Patch Set Update : 11.2.0.4.8 (21352635)  
21352642;ACFS Patch Set Update : 11.2.0.4.8 (21352642)    
21352649;OCW Patch Set Update : 11.2.0.4.8 (21352649)

OPatch succeeded.

3. 兩節點啟動crs

說明:因為是手動打PSU,需要手動進行關閉與啟動操作。  
# cd /u01/app/11.2.0/grid/bin    
# ./crsctl start has    
CRS-4123: Oracle High Availability Services has been started.

五、打database PSU補丁1. 準備工作

(1) Root使用者下,重新給PSU補丁包賦予許可權

cd /u01/software/  
rm -rf 21523375    
chown oracle:oinstall p21523375_112040_Linux-x86-64.zip

(2) oracle使用者

su - oracle  
cd /u01/software/;unzip p21523375_112040_Linux-x86-64.zip

(3) Oracle使用者下檢查相容性,針對多次打CPU的環境中。

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/software/21523375/21352635 -oh $ORACLE_HOME    
----------------------------------------------------    
Oracle Interim Patch Installer version 11.2.0.3.11    
Copyright (c) 2015, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home      : /u01/app/oracle/product/11.2.0/db_1  
Central Inventory : /u01/app/oraInventory    
  from          : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc    
OPatch version    : 11.2.0.3.11    
OUI version      : 11.2.0.4.0    
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-12-21_09-25-57AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.  
----------------------------------------------------

2. oracle database打補丁,還是用同一個補丁包

su - oracle  
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch napply -oh $ORACLE_HOME -local /u01/software/21523375/21352635

查看打補丁情況:

/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lsinv  
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lspatches

 

六、升級資料庫資料字典1. 資料庫啟動

(1) root使用者下打grid需要關閉grid(兩節點都執行)

cd /u01/app/11.2.0/grid/bin  
./crsctl start has

或直接執行如下命令,同時關閉兩個節點。  
./crs_start -all


$ sqlplus / as sysdba    
 
SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 15 13:40:39 2013    
 
Copyright (c) 1982, 2011, Oracle.  All rights reserved.    
 
Connected to an idle instance.    
 
SQL> startup

ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'  
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora    
ORA-15001: diskgroup "DATA" does not exist or is not mounted    
ORA-15040: diskgroup is incomplete    
ORA-15040: diskgroup is incomplete    
ORA-15040: diskgroup is incomplete

說明:無法啟動資料庫,經過查詢是因為oracle許可權被更改為oracle:oinstall。通過如下方式解決。    
在叢集的所有節點上執行如下命令修改:      
# chown oracle:asmadmin /u01/app/oracle/product/11.2.0/db_1/bin/oracle      
# chmod 6751 /u01/app/oracle/product/11.2.0/db_1/bin/oracle

SQL> startup  
ORACLE instance started.

Total System Global Area 2505338880 bytes  
Fixed Size                  2255832 bytes    
Variable Size            687866920 bytes    
Database Buffers        1795162112 bytes    
Redo Buffers              20054016 bytes    
Database mounted.    
Database opened.

SQL> @?/rdbms/admin/catbundle.sql psu apply  
中間等待過程。

執行完後我們可以查到PSU更新資訊:  
SQL>

set line 150  
col ACTION_TIME for a30    
col ACTION for a8    
col NAMESPACE for a8    
col VERSION for a10    
col BUNDLE_SERIES for a5    
col COMMENTS for a20    
select * from dba_registry_history;    
 

ACTION_TIME                    ACTION  NAMESPAC VERSION            ID BUNDL COMMENTS  
------------------------------ -------- -------- ---------- ---------- ----- --------------------    
24-AUG-13 12.03.45.119862 PM  APPLY    SERVER  11.2.0.4            0 PSU  Patchset 11.2.0.2.0    
22-DEC-15 03.53.27.330912 PM  APPLY    SERVER  11.2.0.4            0 PSU  Patchset 11.2.0.2.0    
24-DEC-15 04.58.29.381100 PM  APPLY    SERVER  11.2.0.4            8 PSU  PSU 11.2.0.4.8

3 rows selected.

SQL>    
SQL>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.