ORACLE 11G R2 PSU 补丁升级过程 - 星瑞格

2022-01-29 00:00:00 用户 专区 环境 升级 两位

1. psu 概述

Oracle PSU的全名是Patch Set Update,是Oracle对于发行的官方补丁包,包含了bug的修复。Oracle选取被用户下载数量多,且被验证过具有较低风险的补丁放入到每个季度的PSU中。在每个PSU中不但包含Bug的修复而且还包含了新的CPU。PSU通常随CPU一起发布。

在新部署环境建议打上新的补丁包

2. 升级环境描述

本次升级基本环境如下:

数据库版本

系统版本

升级psu版本

patch

oracle 11.2.0.4

redhat 7.4

11.2.0.4.190416 

p29255947

2016年1月份推出对PSU、SPU、Bundle Patch新的命名规则。 新的命名规则为(以11.2.0.4为例):11.2.0.4.YYMMDD ,YYMMDD为主要patch (PSU、SPU、Bundle)发布的具体日期年份后两位、两位的月份以及两位的日期。如:11.2.0.4.190416表示这11.2.0.4的PSU 是在19年4月16日推出的patch。

3. 升级详细步骤

此升级oracle psu详细步骤如下:

[root@zfbadb1]mkdir /patch

[root@zfbadb1]mv p6880880_112000_Linux-x86-64.zip p29255947_112040_Linux-x86-64.zip /patch/

[root@zfbadb1]cd /u01/app/11.2/grid/

[root@zfbadb1]mv OPatch OPatch_bak

[root@zfbadb1]unzip /patch/p6880880_112000_Linux-x86-64.zip -d ./

[root@zfbadb1]chmod -R 777 OPatch

[root@zfbadb1]chown -R grid:oinstall OPatch

ll OPatch*

OPatch:

total 176

drwxr-x--- 6 grid oinstall  4096 Jun 13 17:54 auto

drwxr-x--- 2 grid oinstall  4096 Jun 13 17:54 config

drwxr-x--- 3 grid oinstall  4096 Jun 13 17:54 crs

drwxr-x--- 2 grid oinstall  4096 Jun 13 17:54 docs

-rwxr-x--- 1 grid oinstall 23550 Jun 13 17:54 emdpatch.pl

drwxr-x--- 2 grid oinstall  4096 Jun 13 17:54 jlib

drwxr-x--- 6 grid oinstall  4096 Jun 13 17:54 jre

drwxr-x--- 9 grid oinstall  4096 Jun 13 17:54 modules

drwxr-x--- 5 grid oinstall  4096 Jun 13 17:54 ocm

-rwxr-x--- 1 grid oinstall 48493 Jun 13 17:54 opatch

-rwxr-x--- 1 grid oinstall 16326 Jun 13 17:54 opatch.bat

-rwxr-x--- 1 grid oinstall  4290 Jun 13 17:54 opatch_env.sh

-rw-r----- 1 grid oinstall  2551 Jun 13 17:54 opatch.pl

drwxr-x--- 4 grid oinstall  4096 Jun 13 17:54 opatchprereqs

-rwxr-x--- 1 grid oinstall  3159 Jun 13 17:54 operr

-rwxr-x--- 1 grid oinstall  4218 Jun 13 17:54 operr.bat

-rw-r----- 1 grid oinstall  3177 Jun 13 17:54 operr_readme.txt

drwxr-x--- 3 grid oinstall  4096 Jun 13 17:54 oplan

drwxr-x--- 3 grid oinstall  4096 Jun 13 17:54 oracle_common

drwxr-x--- 3 grid oinstall  4096 Jun 13 17:54 plugins

-rw-r----- 1 grid oinstall  2915 Jun 13 17:54 README.txt

drwxr-x--- 2 grid oinstall  4096 Jun 13 17:54 scripts

-rw-r----- 1 grid oinstall    27 Jun 13 17:54 version.txt

OPatch_bak:

total 132

drwxr-xr-x 3 grid oinstall  4096 Jun 13 10:04 crs

drwxr-xr-x 2 grid oinstall  4096 Jun 13 10:04 docs

-rw-r----- 1 grid oinstall 23695 Aug  2  2010 emdpatch.pl

drwxr-xr-x 3 grid oinstall  4096 Jun 13 10:04 jlib

drwxr-xr-x 5 grid oinstall  4096 Jun 13 10:04 ocm

-rwx--x--- 1 grid oinstall 31493 May 28  2013 opatch

-rwx--x--- 1 grid oinstall 19867 May 28  2013 opatch.bat

-rwx--x--- 1 grid oinstall 10056 Mar 31  2011 opatchdiag

-rwx--x--- 1 grid oinstall  9352 Mar 31  2011 opatchdiag.bat

-rw-r----- 1 grid oinstall    49 Jun 13 10:04 opatch.ini

-rw-r----- 1 grid oinstall  2576 May  6  2009 opatch.pl

drwxr-xr-x 4 grid oinstall  4096 Jun 13 10:04 opatchprereqs

drwxr-xr-x 3 grid oinstall  4096 Jun 13 10:04 oplan

[root@zfbadb1]# su - oracle

Last login: Thu Jun 13 16:15:23 CST 2019 on pts/1

[root@zfbadb1]$ echo $ORACLE_HOME

/u01/app/oracle/product/11.2

[root@zfbadb1]$ cd $ORACLE_HOME

[root@zfbadb1]$ mv OPatch OPatch_bak

[root@zfbadb1]$ unzip /patch/p6880880_112000_Linux-x86-64.zip -d ./

[root@zfbadb1]$ exit

logout

[root@zfbadb1 grid]#

[root@zfbadb1 grid]#

[root@zfbadb1 grid]]#

[root@zfbadb1 grid]# ll -d OPatch*

drwxr-xr-x 15 grid oinstall 4096 Jun 13 17:54 OPatch

drwxr-xr-x  8 grid oinstall 4096 Jun 13 10:04 OPatch_20190613

[root@dntodu001 grid]# su - grid

Last login: Thu Jun 13 18:00:09 CST 2019

[root@zfbadb1 grid]$ $ORACLE_HOME/OPatch/opatch version

OPatch Version: 11.2.0.3.21

OPatch succeeded.

[root@zfbadb1 grid]$

[root@zfbadb1 grid] cd /patch/

[root@zfbadb1 grid] unzip p29255947_112040_Linux-x86-64.zip

[root@zfbadb1] chmod -R 777 /patch/29255947

正式打psu前需要,生成环境文件,需要在grid用户下生成。oracle用户的环境文件在oracle用户下生成:/u01/app/oracle/product/11.2.0.4/OPatch/ocm/bin/

[root@zfbadb1] chown grid:oinstall -R /patch/

[grid@zfbadb1]$ cd /u01/app/11.2/grid/OPatch/ocm/bin/

[grid@zfbadb1]$ ./emocmrsp

OCM Installation Response Generator 10.3.7.0.0 - Production

Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address for notification of security issues.

Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y

The OCM configuration response file (ocm.rsp) was successfully created.

[grid@zfbadb1 bin]$

[grid@zfbadb1 bin]$ exit

logout

[root@zfbadb1 grid]#

打psu前面需要先确认psu文件权限属主属组要修改为grid:oinstall 。打Oracle psu时,修改为oracle:oinstall

[root@dntodu001 grid]# /u01/app/11.2/grid/OPatch/opatch auto /patch/29255947/ -oh /u01/app/11.2/grid/ -ocmrf /u01/app/11.2/grid/OPatch/ocm/bin/ocm.rsp

Executing /u01/app/11.2/grid/perl/bin/perl /u01/app/11.2/grid/OPatch/crs/patch11203.pl -patchdir /u01/soft -patchn 29255947 -oh /u01/app/11.2/grid/ -ocmrf /u01/app/11.2/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/11.2/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/11.2/grid/cfgtoollogs/opatchauto2021-01-29_18-20-20.log

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

/u01/app/11.2/grid/cfgtoollogs/opatchauto2021-01-29_18-20-20.report.log

2019-06-13 18:20:20: Starting Clusterware Patch Setup

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

Stopping CRS...

Stopped CRS successfully

patch /u01/soft/29255947/29141201  apply successful for home  /u01/app/11.2/grid

patch /u01/soft/29255947/29141056  apply successful for home  /u01/app/11.2/grid

patch /u01/soft/29255947/28729245  apply successful for home  /u01/app/11.2/grid

Starting CRS...

Installing Trace File Analyzer

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

opatch auto succeeded.

[root@zfbadb1 grid]#

[root@zagldb1 ~]# chown oracle:oinstall -R /patch/

[root@zagldb1 ~]$ cd /u01/app/oracle/product/11.2/OPatch/ocm/bin/

[oracle@zagldb1 bin]$ ./emocmrsp

OCM Installation Response Generator 10.3.7.0.0 - Production

Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

Provide your email address to be informed of security issues, install and

initiate Oracle Configuration Manager. Easier for you if you use your My

Oracle Support Email address/User Name.

Visit http://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address for notification of security issues.

Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y

The OCM configuration response file (ocm.rsp) was successfully created.

[oracle@zagldb1 bin]$

[root@zagldb1 11.2]# /u01/app/oracle/product/11.2/OPatch/opatch auto /patch/29255947/ -oh /u01/app/oracle/product/11.2/ -ocmrf /u01/app/oracle/product/11.2/OPatch/ocm/bin/ocm.rsp

Executing /u01/app/11.2/grid/perl/bin/perl /u01/app/oracle/product/11.2/OPatch/crs/patch11203.pl -patchdir /u01/soft -patchn 29255947 -oh /u01/app/oracle/product/11.2/ -ocmrf /u01/app/oracle/product/11.2/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/11.2/grid/crs/install/crsconfig_params

This is the main log file: /u01/app/oracle/product/11.2/cfgtoollogs/opatchauto2021-01-29_18-35-16.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/cfgtoollogs/opatchauto2021-01-29_18-35-16.log

2019-06-13 18:35:16: Starting Clusterware Patch Setup

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

Stopping RAC /u01/app/oracle/product/11.2 ...

Stopped RAC /u01/app/oracle/product/11.2 successfully

patch /u01/soft/29255947/29141201/custom/server/29141201  apply successful for home  /u01/app/oracle/product/11.2

patch /u01/soft/29255947/29141056  apply successful for home  /u01/app/oracle/product/11.2

Starting RAC /u01/app/oracle/product/11.2 ...

Started RAC /u01/app/oracle/product/11.2 successfully

opatch auto succeeded.

[root@zagldb1 11.2]#


相关文章