Oracle 19c 集群环境RU补丁安装

owner
2024-01-25 / 0 评论 / 154 阅读 / 正在检测是否收录...

1 补丁背景

此环境为新装的Oracle19c 版本,未安装补丁。

提前将所需的软件包上传到各节点的opt目录下

功能
p35642822_190000_Linux-x86-64.zipGrid Updates
p35643107_190000_Linux-x86-64.zipDatabase Updates
p35648110_190000_Linux-x86-64.zipJAVAVM
p6880880_190000_Linux-x86-64.zipOPatch
1.1 解压补丁包
# root用户执行
cd /opt/
unzip p35642822_190000_Linux-x86-64.zip -d gi/
unzip p35643107_190000_Linux-x86-64.zip -d db/
unzip p35648110_190000_Linux-x86-64.zip -d javavm/
chown -R grid:oinstall /opt/*
1.2 打补丁注意事项

为保障业务的连续性,先取其中一个节点安装gi,db,javavm补丁。安装完成后,启动节点接管业务后再执行其他节点的安装。

2 GI补丁

:GI 补丁在grid用户下执行检查。更新补丁在root用户下执行

2.1 生产库GI版本-双节点
[grid@rac01:/home/grid]$ crsctl query crs releaseversion
Oracle High Availability Services release version on the local node is [19.0.0.0.0]
[grid@rac01:/home/grid]$ crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [19.0.0.0.0]
2.2 生产库GI OPATH版本-双节点
[grid@rac01:/home/grid]$ opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.
2.3 grid opatch更新-双节点
# root用户执行
mv /u01/app/19.3.0.0/grid/OPatch /u01/app/19.3.0/grid/OPatch.bak
unzip -q /opt/p6880880_190000_Linux-x86-64.zip -d /u01/app/19.3.0/grid/
chmod -R 755 /u01/app/19.3.0/grid/OPatch
chown -R grid:oinstall /u01/app/19.3.0/grid/OPatch
su - grid
opatch version
2.4 GI补丁检查-双节点
2.4.1 安装前补丁版本检查
[grid@rac01:/u01/app/19.3.0/grid]$ opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

OPatch succeeded.
2.4.2 补丁冲突检查
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/gi/35642822/33575402/
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/gi/35642822/35553096/
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/gi/35642822/35643107/
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/gi/35642822/35652062/
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/gi/35642822/35655527/
2.4.3 检查节点空间是否足够打补丁
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/gi/35642822/33575402/
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/gi/35642822/35553096/
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/gi/35642822/35643107/
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/gi/35642822/35652062/
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/gi/35642822/35655527/
2.4.4 GI 补丁自动应用

:root用户执行

# root用户执行以下安装补丁命令
# DBWLM 预估15m
/u01/app/19.3.0/grid/OPatch/opatchauto apply /opt/gi/35642822/33575402/
# TOMCAT 预估10m
/u01/app/19.3.0/grid/OPatch/opatchauto apply /opt/gi/35642822/35553096/
# Database 预估50m
/u01/app/19.3.0/grid/OPatch/opatchauto apply /opt/gi/35642822/35643107/
# ACFS 预估13m
/u01/app/19.3.0/grid/OPatch/opatchauto apply /opt/gi/35642822/35652062/
# OCW 预估15m
/u01/app/19.3.0/grid/OPatch/opatchauto apply /opt/gi/35642822/35655527/
2.5 GI补丁安装完成验证
[grid@rac02:/home/grid]$ opatch lspatches
35655527;OCW RELEASE UPDATE 19.21.0.0.0 (35655527)
35652062;ACFS RELEASE UPDATE 19.21.0.0.0 (35652062)
35643107;Database Release Update : 19.21.0.0.231017 (35643107)
35553096;TOMCAT RELEASE UPDATE 19.0.0.0.0 (35553096)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.

3 Database补丁

3.1 oracle opatch更新-双节点
# root用户执行
mv /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch_bak/
unzip -q /opt/p6880880_190000_Linux-x86-64.zip -d /u01/app/oracle/product/19.3.0/dbhome_1/
chmod -R 755 /u01/app/oracle/product/19.3.0/dbhome_1/OPatch
chown -R oracle:oinstall /u01/app/oracle/product/19.3.0/dbhome_1/OPatch
su - oracle
opatch version
3.2 Database 补丁检查-双节点

:database补丁在oracle用户下执行安装

3.2.1 安装前补丁版本检查
[oracle@rac02:/home/oracle]$ opatch lspatches
35655527;OCW RELEASE UPDATE 19.21.0.0.0 (35655527)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)

OPatch succeeded.
3.2.2 补丁冲突检查
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /opt/db/35643107/
3.2.3 检查节点空间是否足够打补丁
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseDir /opt/db/35643107/
3.2.4 Database 补丁
# 预估1h
/u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatchauto apply /opt/db/35643107/ -oh /u01/app/oracle/product/19.3.0/dbhome_1/
3.2.5 Database 安装完成验证
[oracle@rac02:/home/oracle]$ opatch lspatches
35643107;Database Release Update : 19.21.0.0.231017 (35643107)
35655527;OCW RELEASE UPDATE 19.21.0.0.0 (35655527)

OPatch succeeded.

4 JAVAVM 补丁

4.1 补丁安装-双节点

:安装JAVAVM补丁在Oracle 用户下执行

# oracle用户执行命令
su - oracle
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/javavm/35648110/
# 关闭当前节点实例
sqlplus / as sysdba
shutdown immediate;
exit
# 应用补丁
$ORACLE_HOME/OPatch/opatch apply /opt/javavm/35648110/
# 补丁安装完成后启动数据库
sqlplus / as sysdba
startup;
exit

5 完结注意事项

​ 本次补丁更新需要注意严格按照以上文档描述的用户执行相关命令,更新完一个节点,待节点启动成功后迁移scan到更新好的节点后再进行另一节点的更新。过程无业务中断。

0

评论 (0)

取消