oracle 19.3打补丁到19.20
1.本次是单实例打补丁,不需要GI,所需的补丁如下
p6880880_190000_Linux-x86-64.zip (.37的opatch)
p35354406_190000_Linux-x86-64.zip(OJVM)
p35320081_190000_Linux-x86-64.zip(DB)
p35319490_190000_Linux-x86-64.zip(GI)
2.备份opatch
mv /u01/app/oracle/product/19.3.0/db/OPatch /u01/app/oracle/product/19.3.0/db/OPatch.bak
3.替换高版本opatch
unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
chmod -R 755 /u01/app/oracle/product/19.3.0/db/OPatch
chown –R oracle:oinstall /u01/app/oracle/product/19.3.0/db/OPatch
opatch version
OPatch Version: 12.2.0.1.37
OPatch succeeded.
4.打DB patch
打补丁前需要关闭监听和数据库
unzip p35320081_190000_Linux-x86-64.zip -d /u01/app
chmod -R 755 /u01/app/35320081
chown –R oracle:oinstall /u01/app/35320081
补丁检查
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/app/35320081
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.3.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-08-10_09-46-39AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
补丁空间检查
Vi /tmp/patch_list_gihome.txt
/u01/app/35320081
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.3.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-08-10_09-48-18AM_1.log
Invoking prereq "checksystemspace"
Prereq "checkSystemSpace" passed.
OPatch succeeded.
打补丁
/u01/app/oracle/product/19.3.0/db/OPatch/opatchauto apply /u01/app/35320081 -oh /u01/app/oracle/product/19.3.0/db
OPatchauto session is initiated at Thu Aug 10 09:51:58 2023
OPATCHAUTO-72083: Performing bootstrap operations failed.
OPATCHAUTO-72083: The bootstrap execution failed because Cannot detect any valid Grid Infrastructure setup..
OPATCHAUTO-72083: Fix the reported problem and re-run opatchauto.
OPatchauto session completed at Thu Aug 10 09:51:58 2023
Time taken to complete the session 0 minute, 0 second
opatchauto bootstrapping failed with error code 255.
错误原因,非RAC环境不可以使用opatchauto
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.3.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-08-10_10-02-32AM_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckSystemCommandAvailable" failed.
The details are:
Missing command :fuser
UtilSession failed:
Prerequisite check "CheckSystemCommandAvailable" failed.
Log file location: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-08-10_10-02-32AM_1.log
OPatch failed with error code 73
这个报错是因为缺少fuser命令
yum search fuser
Loaded plugins: fastestmirror
Determining fastest mirrors
====================================================================== Matched: fuser =======================================================================
psmisc.x86_64 : Utilities for managing processes on your system
yum install -y psmisc #安装这个包
正式打patch
cd /u01/app/35320081
/u01/app/oracle/product/19.3.0/db/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.3.0/db
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-08-10_10-11-05AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 35320081
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.3.0/db')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '35320081' to OH '/u01/app/oracle/product/19.3.0/db'




