Oracle 11.2.0.4 PSU实施文档

Posted 工匠精神

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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)

以上是关于Oracle 11.2.0.4 PSU实施文档的主要内容,如果未能解决你的问题,请参考以下文章

ORACLE 11.2.0.4 180116 PSU HP 安腾 11.31 安装

oplan生成PSU步骤失败

转 Oracle最新PSU大搜罗

Opatching PSU in Oracle Database 11g Release 2 RAC on RHEL6

ORACLE 文档 ID 2335265.1

RDBMS 数据库补丁集补丁号码高速參考-文档 ID 1577380.1