Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考

1.Oracel打每个补丁的操作有时存在差异,所以不管多熟悉,都应该在打任何补丁之前阅读新补丁中附带的readme。
2.Oracle每季度都会更新一个最新的PSU,本文最新指的是当前最新(即0719发布的PSU)

本次环境: RHEL 6.5 + Oracle 11.2.0.4 单实例
目前最新的PSU: 补丁程序23054359: DATABASE PATCH SET UPDATE 11.2.0.4.160719
目前最新的OJVM PSU: 补丁程序23177551: OJVM PATCH SET UPDATE 11.2.0.4.160719

1.OPatch 更新

打补丁一定要确保OPatch的版本符合readme中的要求,一般下载对应数据库版本最新的OPath覆盖即可。
此环节主要命令如下:

打补丁之前先备份

echo $ORACLE_HOME
cd $ORACLE_HOME
mv OPatch OPatch_bak
unzip /your_patch_dir/p6880880_112000_Linux-x86-64.zip
$ORACLE_HOME/OPatch/opatch version

–检查当前补丁版本
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lspatches

Tips:your_patch_dir 这里是代指你补丁介质存放的绝对目录.

2.应用PSU补丁
2.1 数据库软件应用补丁:
此环节主要命令如下:

cd /your_patch_dir
unzip p23054359_112040_Linux-x86-64.zip
cd 23054359 (进入补丁目录下)
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
–关闭监听和数据库等相关服务
lsnrctl stop
SQL> shutdown immediate
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply

注意:数据库没有完全关闭是不能应用补丁的

Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.21
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-03-05_19-04-16PM_1.log

Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 12419378

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = ‘/u01/app/oracle/product/11.2.0/dbhome_1’)

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files…

Patch 12419378 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-03-05_19-04-16PM_1.log

–如失败可参考回退文档

2.2 数据库应用补丁:
此环节主要命令如下:

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @?/rdbms/admin/catbundle.sql psu apply
SQL> QUIT

–检查当前补丁版本
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lspatches

3.应用OJVM PSU补丁

3.1 数据库软件应用OJVM补丁:
此环节主要命令如下:

unzip -d <PATCH_TOP_DIR> p23177551_11204_<PLATFORM_NAME>.zip
cd <PATCH_TOP_DIR>/23177551
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
–关闭数据库
SQL> shutdown immediate
cd <PATCH_TOP_DIR>/23177551
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory

3.2 数据库应用OJVM补丁:
此环节主要命令如下:

–加载改动的SQL文件到数据库
cd $ORACLE_HOME/sqlpatch/23177551
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> startup upgrade
SQL> @?/rdbms/admin/postinstall.sql
SQL> shutdown
SQL> startup

–重新编辑无效对象
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @?/rdbms/admin/utlrp.sql

–最后启动监听
!lsnrctl start
SQL> alter system register;

4.检查补丁应用情况

4.1 opatch 检查
$ORACLE_HOME/OPatch/opatch lspatches;
$ORACLE_HOME/OPatch/opatch lsinventory;
正常输出如下:

$ $ORACLE_HOME/OPatch/opatch lspatches;
23177551;OJVM PATCH SET UPDATE 11.2.0.4.160719
23054359;Database Patch Set Update : 11.2.0.4.160719 (23054359)

OPatch succeeded.

/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lsinventory;

Oracle Interim Patch Installer version 11.2.0.3.21
Copyright © 2020, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.21
OUI version : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2020-03-05_19-29-15PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-03-05_19-29-15PM.txt


Local Machine Information::
Hostname: ghyyk
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 11g 11.2.0.1.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch 12419378 : applied on Thu Mar 05 19:08:21 CST 2020
Unique Patch ID: 13769952
Created on 8 Jul 2011, 02:47:43 hrs PST8PDT
Bugs fixed:
9068088, 9363384, 8865718, 8898852, 8801119, 9054253, 8725286, 8974548
9093300, 8909984, 8755082, 8780372, 9952216, 8664189, 8769569, 7519406
9302343, 9471411, 8822531, 7705591, 8650719, 10205230, 9637033, 8883722
8639114, 8723477, 8729793, 8919682, 8856478, 9001453, 8733749, 8565708
8735201, 8684517, 8870559, 8773383, 8981059, 8812705, 9488887, 12534742
8813366, 12534743, 9242411, 12534745, 12534746, 12534747, 8822832
12534748, 8897784, 8760714, 12534749, 8775569, 8671349, 8898589, 9714832
8642202, 9011088, 9369797, 9170608, 9165206, 8834636, 8891037, 8431487
8570322, 8685253, 8872096, 8718952, 8799099, 12534750, 9032717, 9399090
12534751, 12534752, 9713537, 9546223, 12534753, 12534754, 8588519
8783738, 12534755, 12534756, 8834425, 9454385, 8856497, 8890026, 8721315
10248516, 8818175, 8674263, 10249532, 9145541, 8720447, 9272086, 9467635
9010222, 9102860, 9197917, 8991997, 8661168, 8803762, 12419378, 8769239
9654983, 8706590, 8546356, 10408903, 8778277, 9058865, 8815639, 11724991
9971778, 9971779, 9027691, 9454036, 9454037, 9454038, 8761974, 9255542
9275072, 8496830, 8702892, 8818983, 8475069, 8875671, 9328668, 8891929
8798317, 9971780, 8782959, 8774868, 8820324, 8544696, 8702535, 9952260
9406607, 8268775, 9036013, 9363145, 8933870, 8405205, 9467727, 8822365
9676419, 11724930, 8761260, 8790767, 8795418, 8913269, 8717461, 8861700
9531984, 8607693, 8780281, 8330783, 8784929, 8780711, 9341448, 9015983
10323077, 8828328, 9119194, 10323079, 8832205, 8717031, 8665189, 9482399
9676420, 9399991, 8821286, 8633358, 9321701, 9655013, 9231605, 8796511
9167285, 8782971, 8756598, 8703064, 9390484, 9066116, 9007102, 9461782
10323080, 10323081, 10323082, 8753903, 8505803, 9382101, 9352237, 9216806
8918433, 11794163, 9057443, 8790561, 11794164, 8733225, 8795792, 11794165
11794167, 9067282, 8928276, 8837736, 9210925

OPatch succeeded.

4.2
SQL> set linesize 1000
select * from dba_registry_history

ACTION_TIME

ACTION NAMESPACE


VERSION ID BUNDLE_SERIES

COMMENTS

05-MAR-20 07.14.24.362217 PM
APPLY SERVER
11.2.0.1 6 PSU
PSU 11.2.0.1.6

6 rows selected.

至此,Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁(160719)已完成。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值