Oracle 19c rac 补丁升级,从19.7 to19.22-集群

1. 补丁包概述

数据库环境

角色

数据库

IP地址

数据库版本

主机名

数据库名称

源端

RAC

172.30.21.166/167

19.7

hfcwdb66/hfcwdb67

hfdb

将以下补丁包上传到/soft下


上传到两个节点的soft目录下:p6880880_190000_Linux-x86-64.zip (更新opatch)
p35940989_190000_Linux-x86-64.zip(GI包,grid软件升级包)
p35943157_190000_Linux-x86-64.zip(DB包,数据库升级包)

通过网盘分享的文件:oracle 19.22 补丁
链接: https://pan.baidu.com/s/1j9-ZVe7eojN3VZ_fn3ja1g?pwd=y3ih 提取码: y3ih 

 column product format A40
column version format A15
column version_full format A20
column status format A15
select * from product_component_version;SYS@hfdb1>  select * from product_component_version;PRODUCT                                  VERSION         VERSION_FULL         STATUS
---------------------------------------- --------------- -------------------- ------------------------------
Oracle Database 19c Enterprise Edition   19.0.0.0.0      19.7.0.0.0           Production

2. OPatch检查和更新

opatch 现在的版本

[grid@hfdb30:/oracle/app/19c/grid/OPatch]$opatch version
OPatch Version: 12.2.0.1.17OPatch succeeded.
[grid@hfdb30:/oracle/app/19c/grid/OPatch]$

grid 替换 opatch(两个节点都要执行)

注意以下所有操作都是root用户执行的,但是进行查询版本的时候需要进入配置过环境变量的用户

替换完后使用opatch version 命令查看,这里要求所有的节点的 grid 和 oralce 用户下的 opatch 都要升级,我这里是 2 节点的 rac,所以需要升级 4 次。

unzip -o p6880880_190000_Linux-x86-64.zipsu - root
cd /softchown -R grid:oinstall /soft
su - grid -c "unzip -q -o /soft/p6880880_190000_Linux-x86-64.zip -d /oracle/app/19c/grid"
su - grid -c "unzip -q /soft/p35940989_190000_Linux-x86-64.zip -d /soft"chown -R oracle:oinstall /soft
su - oracle -c "unzip -q -o /soft/p35943157_190000_Linux-x86-64.zip -d /oracle/app/oracle/product/19c/db_1"opatch version

oracle 替换 opatch(两个节点都要执行)

su - oracle -c "unzip -q -o /soft/p6880880_190000_Linux-x86-64.zip -d /oracle/app/oracle/product/19c/db_1"su - oracle
opatch version-- 部分操作
[root@hfcwdb66 grid]# mv OPatch OPatch.bak
[root@hfcwdb66 grid]# cp -r /soft/OPatch/ ./
[root@hfcwdb66 grid]# chown grid:oinstall -R OPatch
[root@hfcwdb66 grid]# su - grid
上一次登录:一 12月  9 20:04:06 CST 2024
[grid@hfcwdb66:/home/grid]$cd $ORACLE_HOME
[grid@hfcwdb66:/oracle/app/19c/grid]$cd OPatch
[grid@hfcwdb66:/oracle/app/19c/grid/OPatch]$opatch version
OPatch Version: 12.2.0.1.44OPatch succeeded.

3. 验证Oracle Inventory的有效性

oracle用户和 grid 用户都执行:(两个节点都要执行)

GI HOME 和DB HOME 都需要验证,分别使用grid和oracle用户执行如下命令,确保返回SUCCESS。

$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME 

4. 运行 OPatch 冲突检查(两个节点都要执行)

grid 用户:

su - grid
cd /oracle/app/19c/grid/OPatch/ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/33575402
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35956421
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/36115038-- 部分操作
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-45-20PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-46-16PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.

oracle 用户

su - oracle
cd /oracle/app/19c/grid/OPatch$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489-- 部分操作
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35943157
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-45-20PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/35940989/35967489
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-46-16PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$vim /soft/patch_list_dbhome.txt
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /soft/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-51-31PM_1.logInvoking prereq "checksystemspace"Prereq "checkSystemSpace" passed.OPatch succeeded.

5. 运行opatch命令检查GI HOME下是否有足够的空间

-- grid用户
vim /soft/patch_list_gihome.txt/soft/35940989/35943157
/soft/35940989/35967489
/soft/35940989/35956421
/soft/35940989/36115038
/soft/35940989/33575402$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /soft/patch_list_gihome.txt-- oracle 用户
im /soft/patch_list_dbhome.txt/soft/35940989/35943157
/soft/35940989/35967489$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /soft/patch_list_dbhome.txt--部分操作
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$vim /soft/patch_list_dbhome.txt
[oracle@hfcwdb66:/oracle/app/19c/grid/OPatch]$$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /soft/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.41
Copyright (c) 2024, Oracle Corporation.  All rights reserved.PREREQ sessionOracle Home       : /oracle/app/oracle/product/19c/db_1
Central Inventory : /oracle/app/oraInventoryfrom           : /oracle/app/oracle/product/19c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.41
OUI version       : 12.2.0.7.0
Log file location : /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatch/opatch2024-12-10_17-51-31PM_1.logInvoking prereq "checksystemspace"Prereq "checkSystemSpace" passed.OPatch succeeded.

6. 补丁冲突检测与解决(修补程序)

su - root
cd /
/oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989  -oh /oracle/app/19c/grid -analyze --回滚(这里不需要执行,失败可以执行)
su - root
/u01/app/19.3.0/grid/OPatch/opatchauto rollback /soft/35940989 -analyze -- 部分操作
[root@hfcwdb66 /]# /oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989  -oh /oracle/app/19c/grid -analyzeOPatchauto session is initiated at Tue Dec 10 17:55:25 2024System initialization log file is /oracle/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-12-10_05-55-35PM.log.会话日志文件是/oracle/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-12-10_05-55-42PM.log
此会话的 ID 为 F1LJExecuting OPatch prereq operations to verify patch applicability on home /oracle/app/19c/grid
Patch applicability verified successfully on home /oracle/app/19c/gridExecuting patch validation checks on home /oracle/app/19c/grid
Patch validation checks successfully completed on home /oracle/app/19c/gridOPatchAuto 成功。--------------------------------Summary--------------------------------Analysis for applying patches has completed successfully:Host:hfcwdb66
CRS Home:/oracle/app/19c/grid
Version:19.0.0.0.0==Following patches were SUCCESSFULLY analyzed to be applied:Patch: /soft/35940989/35967489
Log: /oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-12-10_17-56-14下午_1.logPatch: /soft/35940989/35956421
Log: /oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-12-10_17-56-14下午_1.logPatch: /soft/35940989/33575402
Log: /oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-12-10_17-56-14下午_1.logPatch: /soft/35940989/36115038
Log: /oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-12-10_17-56-14下午_1.logPatch: /soft/35940989/35943157
Log: /oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/opatch2024-12-10_17-56-14下午_1.logOPatchauto session completed at Tue Dec 10 17:57:56 2024
Time taken to complete the session 2 minutes, 22 seconds
  • 这里节点1和节点2都需要执行,否则在执行过程会报错
# 下面这个文件节点2可能没有,建议从节点1copy在授权 scp -r /oracle/app/oraInventory/ContentsXML/oui-patch.xml hfcwdb67:/oracle/app/oraInventory/ContentsXML
chmod 777 /oracle/app/oraInventory/ContentsXML/oui-patch.xml
cd /soft/35940989/35967489/files/bin/
chmod 777 *-- 部分操作
[root@hfcwdb66 ContentsXML]# chmod 777 /oracle/app/oraInventory/ContentsXML/oui-patch.xml
[root@hfcwdb66 ContentsXML]# cd /soft/35940989/35967489/files/bin/
[root@hfcwdb66 bin]# chmod 777 *
[root@hfcwdb66 bin]# cd /oracle/app/oraInventory/
[root@hfcwdb66 oraInventory]# ll
总用量 12
drwxrwx--- 4 grid oinstall   64 3月   8 2023 backup
drwxrwx--- 2 grid oinstall   81 3月   8 2023 ContentsXML
drwxrwx--- 6 grid oinstall 4096 3月   8 2023 logs
-rw-rw---- 1 grid oinstall   59 3月   8 2023 oraInst.loc
-rwxrwx--- 1 grid oinstall 1644 3月   8 2023 orainstRoot.sh
[root@hfcwdb66 oraInventory]# cd ContentsXML/
[root@hfcwdb66 ContentsXML]# ll
总用量 16
-rw-rw---- 1 grid oinstall 300 3月   8 2023 comps.xml
-rw-rw---- 1 grid oinstall 557 3月   8 2023 inventory.xml
-rw-rw---- 1 grid oinstall 292 3月   8 2023 libs.xml
-rwxrwxrwx 1 grid oinstall 174 3月   8 2023 oui-patch.xml
[root@hfcwdb66 ContentsXML]# scp oui-patch.xml hfcwdb67:/oracle/app/oraInventory/ContentsXML/
root@hfcwdb67's password:
oui-patch.xml                                                                     

7. 使用root用户应用补丁【节点1打完,再打节点2】

节点 1 停库停监听,节点 2 启库启监听,节点 1, 先打 grid,再打 oralce,打完后把节点 1 启库启监听,再打节点 2,节点 2 停库停监听。

#打节点1补丁
-- 停止节点1的数据库和监听,开始节点2 的监听和数据库
su - root
cd /
export ORACLE_BASE=/oracle/app/grid 
export ORACLE_HOME=/oracle/app/19c/grid 
export PATH=/oracle/app/19c/grid/bin:/oracle/app/19d/grid/OPatch:$PATH -- 打grid
/oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/19c/grid 
-- 补丁时间比较长,日志在/oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/
-- [Dec 10, 2024 9:57:46 PM] [INFO]    EXITING METHOD: NApply(patches,options) --日志显示这个级别上是已经安装好了。# 查看版本的命令
opatch lspatches -- 打oracle
/oracle/app/oracle/product/19c/db_1/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/oracle/product/19c/db_1
-- 补丁时间比较长,日志在/oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/core/opatch/# 查看版本的命令
opatch lspatches #打节点2补丁
-- 启动节点1数据库
srvctl start instance -d hfcwdb -i hfcwdb1# 以下是节点2的
srvctl stop instance -d hfcwdb -i hfcwdb2-- 打grid
/oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/19c/grid
-- 补丁时间比较长,日志在/oracle/app/19c/grid/cfgtoollogs/opatchauto/core/opatch/
-- EXITING METHOD: NApply(patches,options) --日志显示这个级别上是已经安装好了。-- 打oracle
/oracle/app/oracle/product/19c/db_1/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/oracle/product/19c/db_1
-- [Dec 10, 2024 10:49:24 PM] [INFO]   EXITING METHOD: NApply(patches,options)  --日志显示这个级别上是已经安装好了。# 查看版本的命令
opatch lspatches ===============================================其他说也可以直接以前打,但是我这里失败,所以我用的上面的分开给grid和oracle打补丁==================================# 节点1
su - root
cd /
export ORACLE_BASE=/oracle/app/grid 
export ORACLE_HOME=/oracle/app/19c/grid 
export PATH=/oracle/app/19c/grid/bin:/oracle/app/19d/grid/OPatch:$PATH 
# 打补丁
/oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/19c/grid 
或
opatchauto apply /soft/35940989 # 节点2,在打节点2之前,注意先把节点一的服务启动
su - root
cd /
# 打补丁
/u01/app/19.3.0/grid/OPatch/opatchauto apply /soft/35940989
或
opatchauto apply /soft/35940989 # 查看版本的命令
opatch lspatches ==============================================================================================================-- 部分日志
[grid@hfcwdb66:/oracle/app/19c/grid/OPatch]$opatch lspatches
36115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)
35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
35956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)
35943157;Database Release Update : 19.22.0.0.240116 (35943157)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)OPatch succeeded.[root@hfcwdb66 /]# /oracle/app/oracle/product/19c/db_1/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/oracle/product/19c/db_1OPatchauto session is initiated at Tue Dec 10 20:03:23 2024System initialization log file is /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatchautodb/systemconfig2024-12-10_08-03-42PM.log.会话日志文件是/oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/opatchauto2024-12-10_08-04-04PM.log
此会话的 ID 为 Q2PEExecuting OPatch prereq operations to verify patch applicability on home /oracle/app/oracle/product/19c/db_1
Patch applicability verified successfully on home /oracle/app/oracle/product/19c/db_1Executing patch validation checks on home /oracle/app/oracle/product/19c/db_1
Patch validation checks successfully completed on home /oracle/app/oracle/product/19c/db_1Verifying SQL patch applicability on home /oracle/app/oracle/product/19c/db_1
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........Preparing to bring down database service on home /oracle/app/oracle/product/19c/db_1
No step execution required.........Performing prepatch operation on home /oracle/app/oracle/product/19c/db_1
Prepatch operation completed successfully on home /oracle/app/oracle/product/19c/db_1Start applying binary patch on home /oracle/app/oracle/product/19c/db_1[oracle@hfcwdb66:/oracle/app/oracle/product/19c/db_1/OPatch]$opatch lspatches
35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
35943157;Database Release Update : 19.22.0.0.240116 (35943157)
30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)OPatch succeeded.
[oracle@hfcwdb66:/oracle/app/oracle/product/19c/db_1/OPatch]$exit
logout
[root@hfcwdb66 ~]# crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services-- 启动报错
[root@hfcwdb66 ~]# crsctl start crs
CRS-6706: Oracle Clusterware Release patch level ('2194295427') does not match Software patch level ('1476904475'). Oracle Clusterware cannot be started.
CRS-4000: Command Start failed, or completed with errors.-- 解决
[root@hfcwdb66 ~]# clscfg -localpatch
clscfg: EXISTING configuration version 0 detected.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
[root@hfcwdb66 ~]# /oracle/app/19c/grid/crs/install/rootcrs.sh -lock
Using configuration parameter file: /oracle/app/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:/oracle/app/grid/crsdata/hfcwdb66/crsconfig/crslock_hfcwdb66_2024-12-10_08-56-23PM.log
2024/12/10 20:56:31 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'[root@hfcwdb66 ~]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.--节点2:
[root@hfcwdb67 /]# /oracle/app/19c/grid/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/19c/gridOPatchauto session is initiated at Tue Dec 10 21:04:10 2024System initialization log file is /oracle/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-12-10_09-04-28PM.log.Session log file is /oracle/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-12-10_09-05-14PM.log
The id for this session is RCAUExecuting OPatch prereq operations to verify patch applicability on home /oracle/app/19c/grid
Patch applicability verified successfully on home /oracle/app/19c/gridExecuting patch validation checks on home /oracle/app/19c/grid
Patch validation checks successfully completed on home /oracle/app/19c/gridPerforming prepatch operations on CRS - bringing down CRS service on home /oracle/app/19c/grid
Prepatch operation log file location: /oracle/app/grid/crsdata/hfcwdb67/crsconfig/crs_prepatch_apply_inplace_hfcwdb67_2024-12-10_09-14-04PM.log
CRS service brought down successfully on home /oracle/app/19c/gridStart applying binary patch on home /oracle/app/19c/grid[grid@hfcwdb67:/oracle/app/19c/grid/OPatch]$opatch lspatches
36115038;TOMCAT RELEASE UPDATE 19.0.0.0.0 (36115038)
35967489;OCW RELEASE UPDATE 19.22.0.0.0 (35967489)
35956421;ACFS RELEASE UPDATE 19.22.0.0.0 (35956421)
35943157;Database Release Update : 19.22.0.0.240116 (35943157)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)OPatch succeeded.[root@hfcwdb67 /]# /oracle/app/oracle/product/19c/db_1/OPatch/opatchauto apply /soft/35940989 -oh /oracle/app/oracle/product/19c/db_1OPatchauto session is initiated at Tue Dec 10 22:09:16 2024System initialization log file is /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatchautodb/systemconfig2024-12-10_10-09-26PM.log.Session log file is /oracle/app/oracle/product/19c/db_1/cfgtoollogs/opatchauto/opatchauto2024-12-10_10-09-33PM.log
The id for this session is JG1MExecuting OPatch prereq operations to verify patch applicability on home /oracle/app/oracle/product/19c/db_1
Patch applicability verified successfully on home /oracle/app/oracle/product/19c/db_1Executing patch validation checks on home /oracle/app/oracle/product/19c/db_1
Patch validation checks successfully completed on home /oracle/app/oracle/product/19c/db_1Verifying SQL patch applicability on home /oracle/app/oracle/product/19c/db_1
No sqlpatch prereq operations are required on the local node for this home
No step execution required.........Preparing to bring down database service on home /oracle/app/oracle/product/19c/db_1
No step execution required.........Performing prepatch operation on home /oracle/app/oracle/product/19c/db_1
Prepatch operation completed successfully on home /oracle/app/oracle/product/19c/db_1Start applying binary patch on home /oracle/app/oracle/product/19c/db_1Last login: Tue Dec 10 22:49:30 2024
[root@hfcwdb67 ~]# crsctl check crs
CRS-4639: Could not contact Oracle High Availability Services
[root@hfcwdb67 ~]# crsctl start crs
CRS-6706: Oracle Clusterware Release patch level ('2194295427') does not match Software patch level ('1476904475'). Oracle Clusterware cannot be started.
CRS-4000: Command Start failed, or completed with errors.
[root@hfcwdb67 ~]# clscfg -localpatch
clscfg: EXISTING configuration version 0 detected.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
[root@hfcwdb67 ~]# /oracle/app/19c/grid/crs/install/rootcrs.sh -lock
Using configuration parameter file: /oracle/app/19c/grid/crs/install/crsconfig_params
The log of current session can be found at:/oracle/app/grid/crsdata/hfcwdb67/crsconfig/crslock_hfcwdb67_2024-12-10_10-51-25PM.log
2024/12/10 22:51:33 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
[root@hfcwdb67 ~]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

8. 执行相关的升级(只需在一个节点上面执行)

sqlplus / as sysdba
startup
quit
cd $ORACLE_HOME/OPatch
./datapatch -sanity_checks
./datapatch -verbose-- 操作
[oracle@hfcwdb67:/home/oracle]$sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Tue Dec 10 22:52:57 2024
Version 19.22.0.0.0Copyright (c) 1982, 2023, Oracle.  All rights reserved.Connected to an idle instance.SQL> startup
ORACLE instance started.Total System Global Area 2415915888 bytes
Fixed Size                  8942448 bytes
Variable Size             603979776 bytes
Database Buffers         1795162112 bytes
Redo Buffers                7831552 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
[oracle@hfcwdb67:/home/oracle]$cd $ORACLE_HOME/OPatch
[oracle@hfcwdb67:/oracle/app/oracle/product/19c/db_1/OPatch]$./datapatch -sanity_checks
SQL Patching sanity checks version 19.22.0.0.0 on Tue 10 Dec 2024 10:53:57 PM CST
Copyright (c) 2021, 2024, Oracle.  All rights reserved.Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241210_225357_26521/sanity_checks_20241210_225357_26521.logRunning checks
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 942.
Use of uninitialized value $pdb in hash element at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 946.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
Use of uninitialized value $pdb in concatenation (.) or string at /oracle/app/oracle/product/19c/db_1/sqlpatch/sqlpatch_sanity_checks.pm line 932.
JSON report generated in /oracle/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241210_225357_26521/sqlpatch_sanity_checks_summary.json file
Checks completed. Printing report:Check: Database component status - OK
Check: PDB Violations - OK
Check: Invalid System Objects - OK
Check: Tablespace Status - OK
Check: Backup jobs - OK
Check: Temp file exists - OK
Check: Temp file online - OK
Check: Data Pump running - OK
Check: Container status - OK
Check: Oracle Database Keystore - OK
Check: Dictionary statistics gathering - OK
Check: Scheduled Jobs - WARNINGExecution of scheduler jobs while database patching is running may lead to failures and/or performance issues.There are jobs currently running or scheduled to be executed during next hour.Consider patching the database when jobs are not running and will not be scheduled to run during patching.To check for jobs that are running or scheduled to run:SELECT owner as schema_name, job_name, state, next_run_dateFROM sys.all_scheduler_jobsWHERE state = 'RUNNING'UNIONSELECT owner as schema_name, job_name, state, next_run_dateFROM sys.all_scheduler_jobsWHERE state = 'SCHEDULED'and cast(next_run_date as date) > sysdateand cast(next_run_date as date) < sysdate + 1/24;:|         JOB_NAME         |            NEXT_RUN_DATE            | SCHEMA_NAME |   STATE   ||--------------------------+-------------------------------------+-------------+-----------||  CLEANUP_NON_EXIST_OBJ   | 10-DEC-24 11.38.31.255550 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------|| CLEANUP_ONLINE_IND_BUILD | 10-DEC-24 11.52.12.122451 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------||    CLEANUP_ONLINE_PMO    | 10-DEC-24 11.52.52.590843 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------||   CLEANUP_TAB_IOT_PMO    | 10-DEC-24 11.52.22.644627 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------||  CLEANUP_TRANSIENT_PKG   | 10-DEC-24 11.52.42.000000 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------||  CLEANUP_TRANSIENT_TYPE  | 10-DEC-24 11.38.30.925943 PM +08:00 |     SYS     | SCHEDULED ||--------------------------+-------------------------------------+-------------+-----------|
Check: GoldenGate triggers - OK
Check: Logminer DDL triggers - OK
Check: Check sys public grants - OK
Check: Statistics gathering running - OK
Check: Optim dictionary upgrade parameter - OK
Check: Symlinks on oracle home path - OK
Check: Central Inventory - OK
Check: Queryable Inventory dba directories - OK
Check: Queryable Inventory locks - OK
Check: Queryable Inventory package - OK
Check: Queryable Inventory external table - ERRORDatapatch uses opatch_xml_inv which is an external table to get OPatch Inventory information.It was not possible to get information from opatch_xml_inv table.Verify external tables work correctly in your environment. Refer to MOS Note 1602089.1 for more details.hfcwdb2:| RESULT  ||---------|| Failure ||---------|
Check: Imperva processes - OK
Check: Guardium processes - OK
Check: Locale - OKRefer to MOS Note 2680521.1 and debug log
/oracle/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20241210_225357_26521/sanity_checks_debug_20241210_225357_26521.logSQL Patching sanity checks completed on Tue 10 Dec 2024 10:54:56 PM CST
[oracle@hfcwdb67:/oracle/app/oracle/product/19c/db_1/OPatch]$./datapatch -verbose
SQL Patching tool version 19.22.0.0.0 Production on Tue Dec 10 22:55:13 2024
Copyright (c) 2012, 2024, Oracle.  All rights reserved.Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_27778_2024_12_10_22_55_13/sqlpatch_invocation.logConnecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...doneCurrent state of interim SQL patches:
Interim patch 30805684 (OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)):Binary registry: InstalledSQL registry: Applied successfully on 09-MAR-23 12.32.05.334355 AMCurrent state of release update SQL patches:Binary registry:19.22.0.0.0 Release_Update 240104023954: InstalledSQL registry:Applied 19.7.0.0.0 Release_Update 200404035018 successfully on 09-MAR-23 12.32.05.290503 AMAdding patches to installation queue and performing prereq checks...done
Installation queue:No interim patches need to be rolled backPatch 35943157 (Database Release Update : 19.22.0.0.240116 (35943157)):Apply from 19.7.0.0.0 Release_Update 200404035018 to 19.22.0.0.0 Release_Update 240104023954No interim patches need to be applied
Patch installation complete.  Total patches installed: 1Installing patches...
Validating logfiles...done
Patch 35943157 apply: SUCCESSlogfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/35943157/25527362/35943157_apply_HFCWDB_2024Dec10_22_57_27.log (no errors)
SQL Patching tool complete on Tue Dec 10 23:07:09 2024
[oracle@hfcwdb67:/oracle/app/oracle/product/19c/db_1/OPatch]$

Opatch升级的日志,方便以后排错。

通过网盘分享的文件:opatch2024-12-10_22-11-50PM_1.log等4个文件
链接: https://pan.baidu.com/s/1dVur6tANXEIje6CUWAryRA?pwd=6ynq 提取码: 6ynq 

9. 回退补丁升级

su - root
cd //oracle/app/19c/grid/OPatch/opatchauto rollback /soft/35940989
或
opatchauto rollback /soft/35940989 --部分日志
[root@hfcwdb66 /]# /oracle/app/19c/grid/OPatch/opatchauto rollback /soft/35940989  -oh /oracle/app/19c/grid/OPatchauto session is initiated at Wed Dec 11 08:55:53 2024System initialization log file is /oracle/app/19c/grid/cfgtoollogs/opatchautodb/systemconfig2024-12-11_08-56-23AM.log.会话日志文件是/oracle/app/19c/grid/cfgtoollogs/opatchauto/opatchauto2024-12-11_08-56-50AM.log
此会话的 ID 为 4DBIExecuting OPatch prereq operations to verify patch applicability on home /oracle/app/19c/grid
Patch applicability verified successfully on home /oracle/app/19c/gridExecuting patch validation checks on home /oracle/app/19c/grid
Patch validation checks successfully completed on home /oracle/app/19c/gridPerforming prepatch operations on CRS - bringing down CRS service on home /oracle/app/19c/grid
Prepatch operation log file location: /oracle/app/grid/crsdata/hfcwdb66/crsconfig/crs_prepatch_apply_inplace_hfcwdb66_2024-12-11_09-00-26AM.log
CRS service brought down successfully on home /oracle/app/19c/gridStart rolling back binary patch on home /oracle/app/19c/grid
Binary patch rolled back successfully on home /oracle/app/19c/gridRunning rootadd_rdbms.sh on home /oracle/app/19c/grid
Successfully executed rootadd_rdbms.sh on home /oracle/app/19c/gridPerforming postpatch operations on CRS - starting CRS service on home /oracle/app/19c/grid[grid@hfcwdb66:/home/grid]$cd $ORACLE_HOME
[grid@hfcwdb66:/oracle/app/19c/grid]$cd OPatch
[grid@hfcwdb66:/oracle/app/19c/grid/OPatch]$opatch lspatches
30898856;TOMCAT RELEASE UPDATE 19.0.0.0.0 (30898856)
30869304;ACFS RELEASE UPDATE 19.7.0.0.0 (30869304)
30894985;OCW RELEASE UPDATE 19.7.0.0.0 (30894985)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)OPatch succeeded.
[grid@hfcwdb66:/oracle/app/19c/grid/OPatch]$

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/62929.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Windows安装Jira

下载 Download Jira Data Center | Atlassian https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-10.3.0-x64.exe 以管理员身份安装&#xff0c;否则弹出以下提醒 创建和配置MySQL数据库&#xff1a;参照 Connecting Jira applicat…

uniapp - 微信小程序

一、background-image 大图不显示的问题 解决方法&#xff1a; 1、使用网络地址&#xff1b;2、使用 base64 urlTobase64(filePath) {// #ifdef MP-WEIXINlet img ${filePath},imgBase64 wx.getFileSystemManager().readFileSync(img, "base64"),base64Url data:…

DETR: End-to-End Object Detection with Transformers论文学习

论文地址&#xff1a;https://arxiv.org/pdf/2005.12872 代码地址&#xff1a;https://github.com/facebookresearch/detr 相关学习视频&#xff1a;https://space.bilibili.com/94779326/lists?sid1531941 标题前言&#xff1a; DETR 是 Facebook 团队于 2020 年提出的基于…

LeetCode 24反转链表

单链表反转&#xff1a;详细解析与代码实现 在数据结构的学习过程中&#xff0c;链表是一个非常重要且有趣的部分&#xff0c;而单链表的反转操作更是常考的基础知识点。今天就来和大家详细讲讲如何实现单链表的反转&#xff0c;并通过代码示例来加深理解呀。 题目 给定单链…

Redis学习笔记之——学习计划

Redis——Remote Dictionary Server&#xff0c;开源、基于内存、速度快、key-value... Redis做为一个高性能的键值存储系统&#xff0c;广泛应用于缓存、会话存储、分布式锁以及其他需要快速访问的数据场景中。熟悉掌握redis&#xff0c;似乎已成为广大码农们必备的一项技能。…

网络安全教学博客(二):常见网络安全威胁剖析

在上一篇博客中&#xff0c;我们了解了网络安全的基础概念和重要性。今天&#xff0c;让我们深入探讨一下常见的网络安全威胁&#xff0c;以便我们能够更好地识别和防范它们。 恶意软件&#xff08;Malware&#xff09; 病毒&#xff08;Virus&#xff09;&#xff1a;病毒是一…

Vue3状态管理:Pinia架构设计分析

Vue3状态管理:Pinia架构设计分析 介绍 在Vue.js开发中&#xff0c;状态管理是一个非常重要的部分。随着Vue3的发布&#xff0c;Pinia作为一种新的状态管理架构也相继问世。本文将对Pinia架构进行深入分析&#xff0c;帮助读者了解其设计原理、特点以及在实际项目中的应用。 架构…

【IDEA】启动报错

今天启动IDEA报错 报错信息&#xff1a; Cannot connect to already running IDE instance. Exception: Process 5,444 is still running 打开任务管理器&#xff0c;关掉进程ID5444的任务

socket编程UDP-实现停等机制(接收确认、超时重传)

在下面博客中&#xff0c;我介绍了利用UDP模拟TCP连接、按数据包发送文件的过程&#xff0c;并附上完整源码。 socket编程UDP-文件传输&模拟TCP建立连接脱离连接&#xff08;进阶篇&#xff09;_udp socket发送-CSDN博客 下面博客实现的是滑动窗口机制&#xff1a; sock…

uniapp小程序的锚点定位(将页面滚动到目标位置)

小程序中&#xff0c;a页面跳转到b页面&#xff0c;跳转后滚动定位到b页面的特定位置。 1.uni.pageScrollTo传递一个scrollTop参数可以滚动到特定位置。2.可以通过 uni.createSelectorQuery()等获取定位元素的位置信息。3.uni.getSystemInfoSync()获取设备的导航栏和状态栏高度…

php基础:命名空间

1.PHP 命名空间可以解决以下两类问题&#xff1a; 1.用户编写的代码与PHP内部的类/函数/常量或第三方类/函数/常量之间的名字冲突。 2.为很长的标识符名称(通常是为了缓解第一类问题而定义的)创建一个别名&#xff08;或简短&#xff09;的名称&#xff0c;以提高源代码的可读…

分布式 CAP理论 总结

前言 相关系列 《分布式 & 目录》《分布式 & CAP理论 & 总结》《分布式 & CAP理论 & 问题》 分布式 分布式的核心是将大型业务拆解成多个子业务以使之在不同的机器上执行。分布式是用于解决单个物理机容量&性能瓶颈问题而采用的优化手段&#xf…

python xpath解析笔记

与bs4的区别 bs4有很多属性和方法&#xff0c;而xpath只有一个方法&#xff0c;是通过不同的xpath表达式实现很多功能的。 html例子 定位 tree.xpath(‘/html/head/title’) 返回列表。 开头的斜杠表示从根节点遍历。 中间的斜杠表示层级。&#xff08;相当于bs4中的>…

Q学习(Q-Learning)详解

✅作者简介&#xff1a;2022年博客新星 第八。热爱国学的Java后端开发者&#xff0c;修心和技术同步精进。 &#x1f34e;个人主页&#xff1a;Java Fans的博客 &#x1f34a;个人信条&#xff1a;不迁怒&#xff0c;不贰过。小知识&#xff0c;大智慧。 &#x1f49e;当前专栏…

树状数组详解

概述 树状数组&#xff08;Binary Indexed Tree&#xff0c;简称BIT&#xff09;&#xff0c;是一种数据结构&#xff0c;用于处理区间查询和更新问题。它是一种可以高效地在对数级别时间复杂度内进行单点更新和区间查询的数据结构。树状数组通常用于解决以下两类问题&#xf…

freeswitch(开启支持MCU视频会议,使用mod_av模块)

亲测版本centos 7.9系统–》 freeswitch1.10.9 本人freeswitch安装路径(根据自己的路径进入) /usr/local/freeswitch/etc/freeswitch场景说明: 有些场景想使用视频会议MCU融合画面进行开会使用方法: 第一步:下载插件 yum install -y epel-release yum install

【大数据技术基础】【记录Ubuntu 16.04升级到18.04】Ubuntu的一个版本升级到另一个版本

在 Ubuntu 操作系统中进行软件更新和系统升级 Ubuntu Kylin 16.04 LTS 系统进行系统升级到 Ubuntu 18.04.6 LTS 版本 升级提示&#xff1a;系统弹出提示框&#xff0c;告知用户有新版本的 Ubuntu 可用&#xff0c;询问用户是否想要升级。 认证窗口&#xff1a;显示了一个认证…

这是一个vue3 + scss的数字滚动效果

介绍: 当数字变化时&#xff0c;只改变变化的数字位&#xff0c;其余的不变&#xff0c;可以递增、递减、骤变、负数也可以&#xff0c;但是样式要根据具体的项目需求去改&#xff1b; 效果1、增加数字&#xff1a; 效果2、减少数字&#xff1a; 使用方法&#xff1a; <te…

TortoiseGit的下载、安装和配置

一、TortoiseGit的简介 tortoiseGit是一个开放的git版本控制系统的源客户端&#xff0c;支持Winxp/vista/win7.该软件功能和git一样 不同的是&#xff1a;git是命令行操作模式&#xff0c;tortoiseGit界面化操作模式&#xff0c;不用记git相关命令就可以直接操作&#xff0c;读…

最新版Chrome浏览器加载ActiveX控件之Adobe PDF阅读器控件

背景 Adobe PDF阅读器控件是一个ActiveX控件&#xff0c;用于在Windows平台上显示和操作PDF文件。它提供了一系列方法和属性&#xff0c;可以实现对PDF文件的加载、显示、搜索、打印、保存等操作。 allWebPlugin中间件是一款为用户提供安全、可靠、便捷的浏览器插件服务的中间件…