oracle 12c rac/restart 更新psu

1、升级oracle home、grid home opatch 到psu要求的版本,具体要求版本可从psu 中readme查看

# mv /u01/app/12.2.0/grid/OPatch /u01/app/12.2.0/grid/OPatch_bak

#mv /u01/app/oracle/product/12.2.0/db_1/OPatch/ /u01/app/oracle/product/12.2.0/db_1/Opatch_bak/

# unzip p6880880_122010_Linux-x86-64.zip  -d /u01/app/12.2.0/grid/

# unzip p6880880_122010_Linux-x86-64.zip  -d /u01/app/oracle/product/12.2.0/db_1/

#chown -R grid:oinstall /u01/app/12.2.0/grid/OPatch
# chmod -R 755 /u01/app/12.2.0/grid/OPatch
# chown -R oracle:oinstall /u01/app/oracle/product/12.2.0/db_1/OPatch
# chmod -R 755 /u01/app/oracle/product/12.2.0/db_1/OPatch

2、解应psu 补丁分别到/home/oracle 、/home/grid 目录,调整权限:

# cd /home/oracle/

# chown -R oracle:oinstall patch/

# chmod -R 755 patch/

# cd /home/grid/

# chown -R oracle:oinstall patch/

# chmod -R 755 patch/

3、确保已经配置好集群,集群服务启动状态:

# ./crsctl start has

4、使用root 分别更新grid home、oracle home:

# /u01/app/12.2.0/grid/OPatch/opatchauto apply /home/grid/patch/30116802/ -oh /u01/app/12.2.0/grid

OPatchauto session is initiated at Tue Mar 9 18:29:27 2021

System initialization log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-03-09_06-29-2
9PM.log.
Session log file is /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2021-03-09_06-29-31PM.log
The id for this session is H2KW

Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.2.0/grid
Patch applicability verified successfully on home /u01/app/12.2.0/grid


Bringing down CRS service on home /u01/app/12.2.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/jsmesarp2/crsconfig/hapatch_2021-03-09_06-29-42PM.
logCRS service brought down successfully on home /u01/app/12.2.0/grid


Start applying binary patch on home /u01/app/12.2.0/grid
Binary patch applied successfully on home /u01/app/12.2.0/grid


Starting CRS service on home /u01/app/12.2.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/jsmesarp2/crsconfig/hapatch_2021-03-09_06-31-42PM
.logCRS service started successfully on home /u01/app/12.2.0/grid

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:jsmesarp2
SIHA Home:/u01/app/12.2.0/grid
Version:12.2.0.1.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /home/grid/patch/30116802/26839277
Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-29-55PM_1.log

Patch: /home/grid/patch/30116802/30093408
Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-29-55PM_1.log

Patch: /home/grid/patch/30116802/30122814
Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-29-55PM_1.log

Patch: /home/grid/patch/30116802/30122828
Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-29-55PM_1.log

Patch: /home/grid/patch/30116802/30138470
Log: /u01/app/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-29-55PM_1.log

 

OPatchauto session completed at Tue Mar 9 18:32:00 2021
Time taken to complete the session 2 minutes, 33 seconds

 

#  /u01/app/oracle/product/12.2.0/db_1/OPatch/opatchauto apply /home/oracle/patch/30116802/  -oh /u01/app/oracle/product/12.2.0/db_1/

OPatchauto session is initiated at Tue Mar 9 18:34:32 2021

System initialization log file is /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchautodb/systemconfig202
1-03-09_06-34-34PM.log.
Session log file is /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/opatchauto2021-03-09_06-34-37PM
.logThe id for this session is QQCQ

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2.0/db_1
Patch applicability verified successfully on home /u01/app/oracle/product/12.2.0/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/12.2.0/db_1
No step execution required.........

Preparing to bring down database service on home /u01/app/oracle/product/12.2.0/db_1
No step execution required.........

Bringing down database service on home /u01/app/oracle/product/12.2.0/db_1
Database service successfully brought down on home /u01/app/oracle/product/12.2.0/db_1


Start applying binary patch on home /u01/app/oracle/product/12.2.0/db_1
Binary patch applied successfully on home /u01/app/oracle/product/12.2.0/db_1


Starting database service on home /u01/app/oracle/product/12.2.0/db_1
Database service successfully started on home /u01/app/oracle/product/12.2.0/db_1


Preparing home /u01/app/oracle/product/12.2.0/db_1 after database service restarted
No step execution required.........

Trying to apply SQL patch on home /u01/app/oracle/product/12.2.0/db_1
No step execution required.........

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:jsmesarp2
SIDB Home:/u01/app/oracle/product/12.2.0/db_1
Summary:

==Following patches were SKIPPED:

Patch: /home/oracle/patch/30116802/30122828
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /home/oracle/patch/30116802/26839277
Reason: This patch is not applicable to this specified target type - "oracle_database"

Patch: /home/oracle/patch/30116802/30093408
Reason: This patch is not applicable to this specified target type - "oracle_database"


==Following patches were SUCCESSFULLY applied:

Patch: /home/oracle/patch/30116802/30122814
Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-34-47PM_1.log

Patch: /home/oracle/patch/30116802/30138470
Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-09_18-34-47PM_1.log

 

OPatchauto session completed at Tue Mar 9 18:35:44 2021
Time taken to complete the session 1 minute, 12 seconds

5、查看psu是否更新成功:

$ opatch lsinventory

Interim patches (5) :

Patch 30138470 : applied on Tue Mar 09 18:31:26 CST 2021
Unique Patch ID: 23136382
Patch description: "Database Oct 2019 Release Update : 12.2.0.1.191015 (30138470)"
Created on 27 Sep 2019, 05:01:26 hrs PST8PDT

posted @   踏雪无痕2017  阅读(224)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
点击右上角即可分享
微信分享提示