首页 > 数据库 >oracle19c rac升级补丁至19.18

oracle19c rac升级补丁至19.18

时间:2023-03-10 09:44:20浏览次数:51  
标签:oracle19c rac app OPatch grid test01 soft 19.18 u01

更新opatch,根据README要求,opatch工具版本至少12.2.0.1.34 或更高版本,两节点oracle用户和grid用户都需要更新opatch

[oracle@test02:/home/oracle]$ cd $ORACLE_HOME/OPatch
[oracle@test02:/u01/app/oracle/product/19.3.0/db/OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

grid用户下:
[grid@test02:/u01/app/19.3.0/grid/OPatch]$ cd $ORACLE_HOME/OPatch
[grid@test02:/u01/app/19.3.0/grid/OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.

 

校验数据库清单并保存结果
$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>

oracle用户下:
[oracle@test01:/u01/app/oracle/product/19.3.0/db/OPatch]$ ./opatch lsinv -detail -oh $ORACLE_HOME
grid用户下:
[grid@test01:/u01/app/19.3.0/grid/OPatch]$ ./opatch lsinv -detail -oh $ORACLE_HOME

上传补丁包到节点一/soft目录,补丁包给755权限,所属用户和组要设置为grid用户和grid组
[root@test01 soft]# chown grid:oinstall p34762026_190000_Linux-x86-64.zip
[root@test01 soft]#
[root@test01 soft]# chmod 755 p34762026_190000_Linux-x86-64.zip
[root@test01 soft]# ll -h
total 2.7G
-rwxr-xr-x 1 grid oinstall 2.7G Mar 2 16:47 p34762026_190000_Linux-x86-64.zip
用grid用户解压补丁包
[root@test01 soft]# su - grid
Last login: Thu Mar 9 14:27:18 CST 2023 on pts/0
[grid@test01:/home/grid]$ cd /soft/
[grid@test01:/soft]$ ll -h
total 2.7G
-rwxr-xr-x 1 grid oinstall 2.7G Mar 2 16:47 p34762026_190000_Linux-x86-64.zip
[grid@test01:/soft]$
[grid@test01:/soft]$ unzip p34762026_190000_Linux-x86-64.zip

检查补丁冲突
# For Grid Infrastructure home, as home user(grid用户),返回结果为passed说明无补丁冲突:

[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34765931

[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34768559

[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34768569

[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34863894

[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/33575402

# For database home, as home user(oracle用户)返回结果为passed说明无补丁冲突:
% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34765931

% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/34762026/34768559

检查操作系统空间是否足够
# For Grid Infrastructure home, as home user(grid用户):
[grid@test01:/soft]$ vim /tmp/patch_list_gihome.txt
[grid@test01:/soft]$
[grid@test01:/soft]$ cat /tmp/patch_list_gihome.txt
/soft/34762026/34765931
/soft/34762026/34768559
/soft/34762026/34768569
/soft/34762026/34863894
/soft/34762026/33575402
[grid@test01:/soft]$
[grid@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
Oracle Interim Patch Installer version 12.2.0.1.36
Copyright (c) 2023, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/19.3.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/19.3.0/grid/oraInst.loc
OPatch version : 12.2.0.1.36
OUI version : 12.2.0.7.0
Log file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/opatch2023-03-09_14-38-43PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[grid@test01:/soft]$


# For database home, as home user(oracle用户):
[oracle@test01:/soft]$ vim /tmp/patch_list_dbhome.txt
[oracle@test01:/soft]$ cat /tmp/patch_list_dbhome.txt
/soft/34762026/34765931
/soft/34762026/34768559
[oracle@test01:/soft]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.36
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.36
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-03-09_14-40-56PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@test01:/soft]$

节点一安装前分析:
[grid@test01:/soft]$ echo $ORACLE_BASE
/u01/app/grid
[grid@test01:/soft]$ echo $ORACLE_HOME
/u01/app/19.3.0/grid
[grid@test01:/soft]$ echo $PATH
/u01/app/19.3.0/grid/bin:/u01/app/19.3.0/grid/OPatch:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/grid/.local/bin:/home/grid/bin
[grid@test01:/soft]$
[grid@test01:/soft]$ exit
logout
[root@test01 soft]#
[root@test01 soft]# export ORACLE_BASE=/u01/app/grid
[root@test01 soft]# export ORACLE_HOME=/u01/app/19.3.0/grid
[root@test01 soft]# export PATH=/u01/app/19.3.0/grid/bin:/u01/app/19.3.0/grid/OPatch:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/grid/.local/bin:/home/grid/bin
[root@test01 soft]#
[root@test01 soft]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft/34762026 -analyze
节点一升级GI:
[root@test01 soft]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft/34762026 -oh /u01/app/19.3.0/grid
升级完检查:
[root@test01 ~]# su - grid
Last login: Thu Mar 9 15:59:36 CST 2023
[grid@test01:/home/grid]$ cd $ORACLE_HOME
[grid@test01:/u01/app/19.3.0/grid]$ cd OPatch
[grid@test01:/u01/app/19.3.0/grid/OPatch]$ ./opatch lspatches
34863894;TOMCAT RELEASE UPDATE 19.0.0.0.0 (34863894)
34768569;ACFS RELEASE UPDATE 19.18.0.0.0 (34768569)
34768559;OCW RELEASE UPDATE 19.18.0.0.0 (34768559)
34765931;DATABASE RELEASE UPDATE : 19.18.0.0.230117 (REL-JAN230131) (34765931)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

OPatch succeeded.
[grid@test01:/u01/app/19.3.0/grid/OPatch]$

节点二安装前分析:
[root@test02 /]# export ORACLE_BASE=/u01/app/grid
[root@test02 /]# export ORACLE_HOME=/u01/app/19.3.0/grid
[root@test02 /]# export PATH=/u01/app/19.3.0/grid/bin:/u01/app/19.3.0/grid/OPatch:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/grid/.local/bin:/home/grid/bin
[root@test02 /]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft/34762026 -analyze
节点二升级GI:
[root@test02 soft]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft/34762026 -oh /u01/app/19.3.0/grid


节点一升级DB补丁:
[root@test01 ~]# export ORACLE_BASE=/u01/app/oracle
[root@test01 ~]# export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db
[root@test01 ~]# export PATH=/u01/app/oracle/product/19.3.0/db/bin:/u01/app/oracle/product/19.3.0/db/OPatch:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin
[root@test01 ~]#
[root@test01 ~]# /u01/app/oracle/product/19.3.0/db/OPatch/opatchauto apply /soft/34762026 -oh /u01/app/oracle/product/19.3.0/db



节点二升级DB补丁:
升级节点二DB补丁前,先检查/u01/app/oraInventory/ContentsXML/oui-patch.xml权限,需授予660权限
[root@test02 ContentsXML]# ll -h
total 16K
-rw-rw---- 1 grid oinstall 300 Mar 9 16:34 comps.xml
-rw-rw---- 1 grid oinstall 555 Sep 7 2022 inventory.xml
-rw-rw---- 1 grid oinstall 292 Mar 9 16:34 libs.xml
-rw-r--r-- 1 grid oinstall 174 Mar 9 16:34 oui-patch.xml
[root@test02 ContentsXML]# chmod 660 oui-patch.xml
[root@test02 ContentsXML]#
[root@test02 ContentsXML]# ll -h
total 16K
-rw-rw---- 1 grid oinstall 300 Mar 9 16:34 comps.xml
-rw-rw---- 1 grid oinstall 555 Sep 7 2022 inventory.xml
-rw-rw---- 1 grid oinstall 292 Mar 9 16:34 libs.xml
-rw-rw---- 1 grid oinstall 174 Mar 9 16:34 oui-patch.xml
[root@test02 ContentsXML]# pwd
/u01/app/oraInventory/ContentsXML
[root@test02 ContentsXML]#
调整完权限后开始打节点二DB补丁:
[root@test02 /]# cd /soft/
[root@test02 soft]# export ORACLE_BASE=/u01/app/oracle
[root@test02 soft]# export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db
[root@test02 soft]# export PATH=/u01/app/oracle/product/19.3.0/db/bin:/u01/app/oracle/product/19.3.0/db/OPatch:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin
[root@test02 soft]#
[root@test02 soft]# /u01/app/oracle/product/19.3.0/db/OPatch/opatchauto apply /soft/34762026 -oh /u01/app/oracle/product/19.3.0/db

更新数据字典:
[oracle@test02:/home/oracle]$sqlplus / as sysdba
SQL> startup;
SQL> alter pluggable database all open;
SQL> exit;
[oracle@test01:/u01/app/oracle/product/19.3.0/db/OPatch]$% cd $ORACLE_HOME/OPatch
[oracle@test01:/u01/app/oracle/product/19.3.0/db/OPatch]$% ./datapatch -verbose

处理无效对象
[oracle@test02:/home/oracle]$ cd $ORACLE_HOME/rdbms/admin
SQL>select status,count(*) from dba_objects group by status;
SQL>@?/rdbms/admin/utlrp

标签:oracle19c,rac,app,OPatch,grid,test01,soft,19.18,u01
From: https://www.cnblogs.com/maxiaojia/p/17202328.html

相关文章

  • oracle触发器详解
    原文地址: https://www.cnblogs.com/programmer-wind/archive/2011/09/10/2919585.html触发器是许多关系数据库系统都提供的一项技术。在ORACLE系统里,触发器类似过程和函......
  • Oracle定时任务之Job和Dbms_job(转)
    感谢老哥,解决了我的疑惑https://www.cnblogs.com/yscit/p/10376005.htmlhttps://www.cnblogs.com/ybhcolin/archive/2013/04/17/3026646.html一、概述Oralce中的任务有2......
  • ORACLE SEQUENCE(队列)用法2
    PS:当需要产生唯一ID的时候,MSSQL只需将ID设置为int类型,并且设置为自增长就能达到.oracle中需要用序列+触发器才可以达到MSSQL中的只增长效果.(俩者还是有区别的.oracl......
  • Oracle 查询超级慢之buffer sort
    查询超级慢之buffersort在视图中增加了一个临时表作为一个数据源进行id和名称的转换,没加的时候一秒不到,加了以后14秒,感觉有点问题,于是打开了解释计划看了下,发现这个buffe......
  • 安装oracle 11g odbc驱动,安装visual studio 2019 2022支持ef的工具 entityframework
    安装oracleodbc驱动1.安装Oracle-Client-for-Microsoft-Tools.exe2.下载instantclient-basic-windows.x64-11.2.0.4.0.zip3.下载 instantclient-odbc-windows.x64-1......
  • Oracle DG概念与进程(转)
    Oracle比较熟知的高可用架构:DG,RAC等。RAC:解决单点故障和进行负载均衡DG:通过冗余数据来提供数据保护(日志同步机制),分散主数据库性能压力一.dataguard架构DG包括:日志发......
  • datahub 采集oracle数据 DPI-1047: Cannot locate a 64-bit Oracle Client library: l
    datahub命令行采集oracle报错如下:datahubingest-coracle.ymlsqlalchemy.exc.DatabaseError:(cx_Oracle.DatabaseError)DPI-1047:Cannotlocatea64-bitOr......
  • OracleDatabase——数据库表空间dmp导出与导入
    由于公司的程序一直部署在客户现场内网,内网调试难度高,一般是有备份还原数据库的需求,这里简记备份(导出)数据库dmp文件与恢复(导入)的步骤。一、导出dmp文件exp与expdp命令异......
  • Uncaught SyntaxError: Invalid regular expression: /[讗-转貈-劭輴-菘啖�-啵�]/: Rang
    解决办法:表面看是正则表达式写的有问题,实际是编码规则除了问题。在index.html中添加<metacharset="utf-8"/>参考:https://blog.csdn.net/duyy1990/article/details/12901......
  • Oracle问题:ORA-01109解决办法
    ORA-01109:数据库未打开01109.00000-"databasenotopen"*Cause:Acommand查看数据库监听:启动启动数据库达到open状态后面发现连接的那个库没有到opened状态selectc......