天天看點

Oracle 11.2.0.4 PSU實施文檔

1. 本次服務詳細過程

1.1 背景概述

更新資料庫PUS,資料庫環境,作業系統版本:RedHat5.8 x64,資料庫版本Oracle 11.2.0.4 x64 RAC

Grid: 11.2.0.4,Oracle database: 11.2.0.4

1.2 安裝前準備

-rw-r--r-- 1 oracle oinstall  93376160 Mar 25 11:43 p21948347_112040_Linux-x86-64.zip

-rw-r--r-- 1 oracle oinstall 687630001 Mar 25 11:45 p22191577_112040_Linux-x86-64.zip

-rw-r--r-- 1 oracle oinstall  52733900 Mar 25 11:45 p6880880_112000_Linux-x86-64.zip

(1) Opatch:p6880880_112000_Linux-x86-64.zip

(2) GI PSU:p22191577_112040_Linux-x86-64.zip

(3) DB PSU: p21948347_112040_Linux-x86-64.zip

備注:GI PSU 包括 DB PSU和 CPU, OPatch Version: 11.2.0.3.12 GI PSU解壓後檔案說明:

drwxr-xr-x  5 oracle oinstall  4096 Nov 18 16:55

21948355

drwxr-xr-x  5 oracle oinstall  4096 Dec 14 15:42

21948348

drwxrwxr-x 11 oracle oinstall  4096 Dec 14 19:33

21948347

-rw-rw-r--  1 oracle oinstall 68836 Dec 17 05:10 PatchSearch.xml

-rw-r--r--  1 oracle oinstall   549 Dec 19 13:30 bundle.xml

-rw-r--r--  1 oracle oinstall     0 Dec 19 13:31 README.txt

-rw-r--r--  1 oracle oinstall 62889 Jan 19 23:03 README.html

(1)

21948355

為 ACFS Patch Set

(2)

21948348

為 OCW Patch Set

(3)

21948347

為 Database Patch Set

1.3 更新Opatch
drwxr-x--- 10 oracle oinstall      4096 Aug 18  2015 OPatch -rw-r--r--  1 oracle oinstall  52733900 Mar 25 11:45 p6880880_112000_Linux-x86-64.zip

解壓後拷貝到兩個節點$GRID_HOME,$ORACLE_HOME 下

兩個節點Grid 使用者Opatch驗證

[[email protected] OPatch]$ ./opatch version

OPatch Version: 11.2.0.3.12

OPatch succeeded.

兩個節點Oracle使用者Opatch驗證

[[email protected] OPatch]$ ./opatch version

OPatch Version: 11.2.0.3.12

OPatch succeeded.

備注:兩個節點grid,oracle 下Opatch 都需要驗證更新是否成功。

1.4 更新 GI PSU準備工作

(1) 節點1操作,關閉crs

以root使用者執行:切換到$GRID_HOME 目錄

/u01/11.2.0/grid/bin/crsctl stop crs

(2) root 使用者執行

以root使用者執行:切換到$GRID_HOME 目錄

/u01/11.2.0/grid/crs/install/rootcrs.pl -unlock

(3) 節點2,重複以上兩步驟

(4) 節點1,節點2 操作,grid使用者下測試相容性

su - grid

$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/325/22191577/21948347 -oh $GRID_HOME

$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/325/22191577/21948348 -oh $GRID_HOME

$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/grid/325/22191577/21948355 -oh $GRID_HOME

輸出結果如下:

Oracle Interim Patch Installer version 11.2.0.3.12

Copyright (c) 2016, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/11.2.0/grid

Central Inventory : /u01/app/oraInventory

from           : /u01/11.2.0/grid/oraInst.loc

OPatch version    : 11.2.0.3.12

OUI version       : 11.2.0.4.0

Log file location : /u01/11.2.0/grid/cfgtoollogs/opatch/opatch2016-03-25_13-37-48PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

1.5 開始更新GI PSU

(1) 節點1操作,給GI HOME打更新檔,以grid使用者執行:/u01/11.2.0/grid/ 為$GRID_HOME 目錄

su - grid

/u01/11.2.0/grid/OPatch/opatch napply -oh $GRID_HOME -local /home/grid/325/22191577/21948347

/u01/11.2.0/grid/OPatch/opatch napply -oh $GRID_HOME -local /home/grid/325/22191577/21948348

/u01/11.2.0/grid/OPatch/opatch napply -oh $GRID_HOME -local /home/grid/325/22191577/21948355

更新過程中按三個Y

(2) 節點1執行完成,執行節點2

(3) 兩個節點執行完驗證

[[email protected] OPatch]$ ./opatch lspatches

21948355;ACFS Patch Set Update : 11.2.0.4.160119 (21948355)

21948348;OCW Patch Set Update : 11.2.0.4.160119 (21948348)

21948347;Database Patch Set Update : 11.2.0.4.160119 (21948347)

OPatch succeeded.

[[email protected] OPatch]$ ./opatch lsinv

Oracle Interim Patch Installer version 11.2.0.3.12

Copyright (c) 2016, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/11.2.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/11.2.0/grid/oraInst.loc

OPatch version    : 11.2.0.3.12

OUI version       : 11.2.0.4.0

Log file location : /u01/11.2.0/grid/cfgtoollogs/opatch/opatch2016-03-25_16-43-33PM_1.log

Lsinventory Output file location : /u01/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2016-03-25_16-43-33PM.txt

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

Local Machine Information::

Hostname: node1-11gr2

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 11g                                       11.2.0.4.0

There are 1 products installed in this Oracle Home.

Interim patches (3) :

Patch  21948355

     : applied on Fri Mar 25 13:55:28 HKT 2016

Unique Patch ID:  19576928

Patch description:  "ACFS Patch Set Update : 11.2.0.4.160119 (21948355)"

   Created on 18 Nov 2015, 00:55:35 hrs PST8PDT

   Bugs fixed:

     21369858, 16318126, 19690653, 17503605, 17203009, 17359415, 20140148

     17611362, 17164243, 19053182, 17696547, 17488768, 18168684, 21519796

     18143006, 21208140, 17428148, 17070158, 20438706, 17510275, 17172303

     18610307, 17376318, 17721778, 17699423, 18915417, 18155334, 18321597

     19919907, 18185024, 17636008, 17363999, 20681968, 17475946

Patch  21948348

     : applied on Fri Mar 25 13:52:44 HKT 2016

Unique Patch ID:  19576928

Patch description:  "OCW Patch Set Update : 11.2.0.4.160119 (21948348)"

   Created on 13 Dec 2015, 23:42:28 hrs PST8PDT

   Bugs fixed:

     19270660, 18328800, 18508710, 18691572, 20038451, 21251192, 21232394

     20365005, 17750548, 17387214, 17617807, 14497275, 20219458, 17733927

     18180541, 18962892, 17292250, 17378618, 16759171, 20110156, 17843489

Patch  21948347

     : applied on Fri Mar 25 13:47:49 HKT 2016

Unique Patch ID:  19564435

Patch description:  "Database Patch Set Update : 11.2.0.4.160119 (21948347)"

   Created on 14 Dec 2015, 03:31:48 hrs PST8PDT

Sub-patch  21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"

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)"

Rac system comprising of multiple nodes

  Local node = node1-11gr2

  Remote node = node2-11gr2

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

OPatch succeeded.

1.6 更新 RDBMS PSU

(1) 執行pre 腳本

su – oracle

執行DB元件的pre腳本,以oracle使用者執行:

/home/oracle/325/22191577/21948348/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME

/home/oracle/325/22191577/21948348/custom/scripts/prepatch.sh completed successfully.

(2) 應用資料庫更新檔

應用DB更新檔,以oracle使用者執行:

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

./opatch napply -oh $ORACLE_HOME -local /home/oracle/325/22191577/21948348/custom/server/21948348

./opatch napply -oh $ORACLE_HOME -local /home/oracle/325/22191577/21948347

(3) 執行post腳本

運作DB元件post腳本,以oracle使用者執行:

/home/oracle/325/22191577/21948348/custom/scripts/

postpatch.sh

-dbhome $ORACLE_HOME

Reading /u01/oracle/product/11.2.0/db_1/install/params.ora..

Reading /u01/oracle/product/11.2.0/db_1/install/params.ora..

Parsing file /u01/oracle/product/11.2.0/db_1/bin/racgwrap

Parsing file /u01/oracle/product/11.2.0/db_1/bin/srvctl

Parsing file /u01/oracle/product/11.2.0/db_1/bin/srvconfig

Parsing file /u01/oracle/product/11.2.0/db_1/bin/cluvfy

Verifying file /u01/oracle/product/11.2.0/db_1/bin/racgwrap

Verifying file /u01/oracle/product/11.2.0/db_1/bin/srvctl

Verifying file /u01/oracle/product/11.2.0/db_1/bin/srvconfig

Verifying file /u01/oracle/product/11.2.0/db_1/bin/cluvfy

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/racgwrap

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/srvctl

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/srvconfig

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/cluvfy

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/diskmon.bin

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/lsnodes

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/osdbagrp

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/rawutl

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/srvm/admin/ractrans

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/srvm/admin/getcrshome

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/gnsd

Reapplying file permissions on /u01/oracle/product/11.2.0/db_1/bin/crsdiag.pl

Postpatch completed successfully

(4) 添加rdbms并啟動crs

su – root

/u01/11.2.0/grid/rdbms/install/rootadd_rdbms.sh

/u01/11.2.0/grid/crs/install/rootcrs.pl -patch

其中: /u01/11.2.0/grid 為$GRID_HOME目錄

(5)

節點2重複以上步驟

(6) 兩個節點驗證DB更新是否成功

[[email protected] OPatch]$ ./opatch  lspatches

21948347;Database Patch Set Update : 11.2.0.4.160119 (21948347)

21948348;OCW Patch Set Update : 11.2.0.4.160119 (21948348)

OPatch succeeded.

[[email protected] OPatch]$ ./opatch lsinventory

Oracle Interim Patch Installer version 11.2.0.3.12

Copyright (c) 2016, Oracle Corporation.  All rights reserved.

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.12

OUI version       : 11.2.0.4.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2016-03-25_17-01-51PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-03-25_17-01-51PM.txt

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

Local Machine Information::

Hostname: node1-11gr2

ARU platform id: 226

ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0

There are 1 products installed in this Oracle Home.

Interim patches (2) :

Patch  21948347     : applied on Fri Mar 25 14:51:30 HKT 2016

Unique Patch ID:  19564435

Patch description:  "Database Patch Set Update : 11.2.0.4.160119 (21948347)"

Created on 14 Dec 2015, 03:31:48 hrs PST8PDT

Sub-patch  21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"

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:17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699 17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817

Patch  21948348     : applied on Fri Mar 25 14:33:42 HKT 2016

Unique Patch ID:  19576928

Patch description:  "OCW Patch Set Update : 11.2.0.4.160119 (21948348)"

Created on 13 Dec 2015, 23:42:11 hrs PST8PDT

Bugs fixed: 19270660, 18328800, 18508710, 18691572, 20038451, 21251192, 21232394

20365005, 17750548, 17387214, 17617807, 14497275, 20219458, 17733927

Rac system comprising of multiple nodes

Local node = node1-11gr2

Remote node = node2-11gr2

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

OPatch succeeded.

1.7 更新資料字典

對于現有的DB 執行更新字典操作,oracle使用者執行,在一個節點執行就可以。

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP

SQL> @ catbundle.sql psu apply

SQL> QUIT

1.8 編譯無效對象

執行utlrp 腳本 并重新開機DB 變異無效對象

SQL> @ ?/rdbms/admin/utlrp

1.9 重新開機資料庫,兩個節點執行
/u01/11.2.0/grid/bin/crsctl stop crs /u01/11.2.0/grid/bin/crsctl start crs
1.10 驗證資料字典更新是否成功

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

16-NOV-15 08.01.16.766246 PM   APPLY    SERVER   11.2.0.4            0 PSU   Patchset 11.2.0.2.0

25-MAR-16 03.36.13.857424 PM   APPLY    SERVER   11.2.0.4       160119 PSU   PSU 11.2.0.4.160119

1.11 重新開機應用程式
1.12 參考文檔

Oracle Grid Infrastructure 11.2.0.4.x Patch Set Update SUPPLEMENTAL README (文檔 ID 1641136.1)

轉載于:https://www.cnblogs.com/rencheng/p/6618664.html