重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2048|回复: 0
打印 上一主题 下一主题

[Oracle] oracle 19.14升级19.15

[复制链接]
跳转到指定楼层
楼主
发表于 2022-5-25 10:06:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
系统:CentOS7.9
环境:oracle 19.14 + rac
说明:1-9步骤两个节点均需执行
1、备份目录
[root@hisdb1 ~]# tar -zcvPf oraclebase.tar.gz /u01/app/oracle >/dev/null
[root@hisdb1 ~]# tar -zcvPf oraInventory.tar.gz /u01/app/oraInventory >/dev/null
[root@hisdb1 ~]# tar -zcvPf gridbase.tar.gz /u01/app/grid >/dev/null
[root@hisdb1 ~]# tar -zcvPf gridhome.tar.gz /u01/app/11.2.0/grid >/dev/null

2、安装OPatch
说明:19.15 DB的RU编号是:33806152,GI的RU编号是:33803476,OPatch版本至少为12.2.0.1.29
sftp> cd /tmp
sftp> lcd F:\installmedium\19c\19.15
sftp> put p6880880_190000_Linux-x86-64.zip
[grid@hisdb1:/tmp]$ unzip -q -o p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@hisdb1:/tmp]$ unzip -q -o p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[grid@hisdb1 tmp]$ opatch version
OPatch Version: 12.2.0.1.30

OPatch succeeded.
[oracle@hisdb1 tmp]$ opatch version
OPatch Version: 12.2.0.1.30

OPatch succeeded.

3、验证Oracle Inventory
检查DB Home和Grid Home的补丁列表里补丁的一致性.
[grid@hisdb1:/home/grid]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
[oracle@hisdb1:/home/oracle]$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME

4、下载及解压Patch
[root@hisdb1 /]# mkdir /upgrade
[root@hisdb1 /]# chown -R grid:oinstall /upgrade
sftp> lcd F:\installmedium\19c\19.15
sftp> cd /home/grid
sftp> put p33803476_190000_Linux-x86-64.zip
[grid@hisdb1 ~]$ unzip -q p33803476_190000_Linux-x86-64.zip -d /upgrade

5、运行opatch冲突检查
确定当前安装的一次性修补程序是否与此修补程序33803476冲突
grid用户:
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33806152
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33815596
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33815607
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33911149
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33575402

oracle用户:
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33806152
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /upgrade/33803476/33815596

6、运行OPatch检查系统空间
检查ORACLE_HOME文件系统是否有足够的可用空间,以便应用补丁程序:
6.1、grid用户
[grid@hisdb1:/home/grid]$ vi /tmp/patch_lists_gihome.txt
/upgrade/33803476/33806152
/upgrade/33803476/33815596
/upgrade/33803476/33815607
/upgrade/33803476/33911149
/upgrade/33803476/33575402
运行以下命令检查Grid Infrastructure home是否有足够空间.
[grid@hisdb1:/home/grid]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_lists_gihome.txt

6.2、oracle用户
[oracle@hisdb1:/home/oracle]$ vi /tmp/patch_lists_dbhome.txt
/upgrade/33803476/33806152
/upgrade/33803476/33815596
运行以下命令检查oracle home是否有足够空间.
[oracle@hisdb1:/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt

7、一次性补丁冲突检测和解决
[root@hisdb1 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /upgrade/33803476 -analyze
[root@hisdb1 ~]# /u01/app/19.3.0/grid/OPatch/opatchauto rollback /upgrade/33803476 -analyze

8、自动补丁安装
[root@hisdb1 ~]# export PATH=$PATH:/u01/app/19.3.0/grid/OPatch  (说明:/u01/app/19.3.0/grid为GRID_HOME)
[root@hisdb1 ~]# opatchauto apply /upgrade/33803476

9、检查 grid 补丁
[grid@hisdb1 ~]$ opatch lspatches
33911149;TOMCAT RELEASE UPDATE 19.0.0.0.0 (33911149)
33815607;ACFS RELEASE UPDATE 19.15.0.0.0 (33815607)
33815596;OCW RELEASE UPDATE 19.15.0.0.0 (33815596)
33806152;Database Release Update : 19.15.0.0.220419 (33806152)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.
[grid@hisdb1 ~]$ sqlplus -version

SQL*Plus: Release 19.0.0.0.0 - Production
Version 19.15.0.0.0
10、加载SQL
说明:此步骤为加载变化的SQL到数据库,RAC环境只需在节点1执行。
[oracle@hisdb1:/u01/app/oracle/product/19.3.0/db/OPatch]$ ./datapatch -verbose

11、处理无效对象
因之前datapatch命令会加载SQL,此过程可能会产生无效对象,节点1执行@utlrp.sql脚本处理无效对象
SQL> @?/rdbms/admin/utlrp.sql

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-25 23:18 , Processed in 0.116337 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表