Oracle RAC 19C RU19.14部署本文就不描述了,本文在此基础上对Oracle RAC 19C进行补丁升级至19.17
注意:仅安装基础包
crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.chad
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.net1.network
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.ons
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 ONLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE db1 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE db1 Started,STABLE
2 ONLINE ONLINE db2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE db1 STABLE
ora.db1.vip
1 ONLINE ONLINE db1 STABLE
ora.db2.vip
1 ONLINE ONLINE db2 STABLE
ora.his.db
1 ONLINE ONLINE db1 Open,HOME=/u01/app/o
racle/product/19.3.0
/db,STABLE
2 ONLINE ONLINE db2 Open,HOME=/u01/app/o
racle/product/19.3.0
/db,STABLE
ora.qosmserver
1 ONLINE ONLINE db1 STABLE
ora.scan1.vip
1 ONLINE ONLINE db1 STABLE
--------------------------------------------------------------------------------
set linesize 180
col ACTION_TIME for a30;
col COMMENTS for a60;
select action_time,action,version,comments from dba_registry_history;
ACTION_TIME ACTION VERSION COMMENTS
------------------------------ ------------------------------ ------------------------------ ------------------------------------------------------------
BOOTSTRAP 19 RDBMS_19.14.0.0.0DBRU_LINUX.X64_211224.3
31-OCT-22 07.36.23.613394 PM RU_APPLY 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.14.0.0.0: Release_Update
- 211225122123
set linesize 180
col action for a15
col status for a15
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- ---------- --------------- --------------- ---------------
33515361 RU APPLY SUCCESS 19.14.0.0.0
注意:传至/soft目录
p6880880_190000_Linux-x86-64.zip
p34416665_190000_Linux-x86-64.zip
注意:db1和db2都执行
/u01/app/19.3.0/grid/OPatch/opatch version
mv /u01/app/19.3.0/grid/OPatch /u01/app/19.3.0/grid/OPatch.bak
chmod 755 p6880880_190000_Linux-x86-64.zip
unzip -q /soft2/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
/u01/app/19.3.0/grid/OPatch/opatch version
/u01/app/19.3.0/grid/OPatch/opatch version
mv /u01/app/19.3.0/grid/OPatch /u01/app/19.3.0/grid/OPatch.bak
chmod 755 p6880880_190000_Linux-x86-64.zip
unzip -q /soft2/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
/u01/app/19.3.0/grid/OPatch/opatch version
注意:db1和db2都执行
unzip /soft/p34416665_190000_Linux-x86-64.zip -d /soft/
chown -R grid:oinstall /soft/34416665
chmod -R 755 /soft/34416665
OPatch兼容性检查
Validation of Oracle Inventory
Before beginning patch application, check the consistency of inventory information for GI home and each database home to be patched. Run the following command as respective Oracle home owner to check the consistency.
$ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>
注意:db1和db2都执行
[grid@db1:~]$ /u01/app/19.3.0/grid/OPatch/opatch lsinventory -detail -oh /u01/app/19.3.0/grid/
Oracle Interim Patch Installer version 12.2.0.1.33
Copyright (c) 2022, Oracle Corporation. All rights reserved.
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.33
OUI version : 12.2.0.7.0
Log file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/opatch2022-11-12_09-56-44AM_1.log
Lsinventory Output file location : /u01/app/19.3.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2022-11-12_09-56-44AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: hisdb01
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 19c 19.0.0.0.0
There are 1 products installed in this Oracle Home.
Installed Products (102):
Assistant Common Files 19.0.0.0.0
Automatic Storage Management Assistant 19.0.0.0.0
BLASLAPACK Component 19.0.0.0.0
Buildtools Common Files 19.0.0.0.0
Cluster Ready Services Files 19.0.0.0.0
Cluster Verification Utility Common Files 19.0.0.0.0
Cluster Verification Utility CRS Files 19.0.0.0.0
Cluster Verification Utility Files 19.0.0.0.0
Database Configuration and Upgrade Assistants 19.0.0.0.0
Database Migration Assistant for Unicode 19.0.0.0.0
Database SQL Scripts 19.0.0.0.0
Database Workspace Manager 19.0.0.0.0
DB TOOLS Listener 19.0.0.0.0
Deinstallation Tool 19.0.0.0.0
Expat libraries 2.0.1.0.4
Hadoopcore Component 19.0.0.0.0
HAS Common Files 19.0.0.0.0
HAS Files for DB 19.0.0.0.0
Installation Common Files 19.0.0.0.0
Installation Plugin Files 19.0.0.0.0
Installer SDK Component 12.2.0.7.0
Java Development Kit 1.8.0.201.0
LDAP Required Support Files 19.0.0.0.0
OLAP SQL Scripts 19.0.0.0.0
Oracle Advanced Security 19.0.0.0.0
Oracle Bali Share 11.1.1.6.0
Oracle Clusterware RDBMS Files 19.0.0.0.0
Oracle Core Required Support Files 19.0.0.0.0
Oracle Core Required Support Files for Core DB 19.0.0.0.0
Oracle Database 19c 19.0.0.0.0
Oracle Database 19c Multimedia Files 19.0.0.0.0
Oracle Database Deconfiguration 19.0.0.0.0
Oracle Database Utilities 19.0.0.0.0
Oracle DBCA Deconfiguration 19.0.0.0.0
Oracle Extended Windowing Toolkit 11.1.1.6.0
Oracle Globalization Support 19.0.0.0.0
Oracle Globalization Support 19.0.0.0.0
Oracle Globalization Support For Core 19.0.0.0.0
Oracle Grid Infrastructure 19c 19.0.0.0.0
Oracle Grid Infrastructure Bundled Agents 19.0.0.0.0
Oracle Grid Management Database 19.0.0.0.0
Oracle Help for Java 11.1.1.7.0
Oracle Help Share Library 11.1.1.7.0
Oracle Ice Browser 11.1.1.7.0
Oracle Internet Directory Client 19.0.0.0.0
Oracle Java Client 19.0.0.0.0
Oracle JDBC Server Support Package 19.0.0.0.0
Oracle JDBC/OCI Instant Client 19.0.0.0.0
Oracle JDBC/THIN Interfaces 19.0.0.0.0
Oracle JFC Extended Windowing Toolkit 11.1.1.6.0
Oracle JVM 19.0.0.0.0
Oracle JVM For Core 19.0.0.0.0
Oracle LDAP administration 19.0.0.0.0
Oracle Locale Builder 19.0.0.0.0
Oracle Multimedia 19.0.0.0.0
Oracle Multimedia Client Option 19.0.0.0.0
Oracle Multimedia Java Advanced Imaging 19.0.0.0.0
Oracle Multimedia Locator 19.0.0.0.0
Oracle Multimedia Locator Java Required Support Files 19.0.0.0.0
Oracle Multimedia Locator RDBMS Files 19.0.0.0.0
Oracle Net 19.0.0.0.0
Oracle Net Listener 19.0.0.0.0
Oracle Net Required Support Files 19.0.0.0.0
Oracle Netca Client 19.0.0.0.0
Oracle Notification Service 19.0.0.0.0
Oracle Notification Service for Instant Client 19.0.0.0.0
Oracle One-Off Patch Installer 12.2.0.1.15
Oracle Quality of Service Management (Server) 19.0.0.0.0
Oracle RAC Required Support Files-HAS 19.0.0.0.0
Oracle Recovery Manager 19.0.0.0.0
Oracle Security Developer Tools 19.0.0.0.0
Oracle Text Required Support Files 19.0.0.0.0
Oracle Universal Connection Pool 19.0.0.0.0
Oracle Universal Installer 12.2.0.7.0
Oracle USM Deconfiguration 19.0.0.0.0
Oracle Wallet Manager 19.0.0.0.0
oracle.swd.commonlogging 13.3.0.0.0
oracle.swd.opatchautodb 12.2.0.1.5
oracle.swd.oui.core.min 12.2.0.7.0
Parser Generator Required Support Files 19.0.0.0.0
Perl Interpreter 5.28.1.0.0
Perl Modules 5.28.1.0.0
PL/SQL 19.0.0.0.0
PL/SQL Embedded Gateway 19.0.0.0.0
Platform Required Support Files 19.0.0.0.0
Precompiler Required Support Files 19.0.0.0.0
RDBMS Required Support Files 19.0.0.0.0
RDBMS Required Support Files for Instant Client 19.0.0.0.0
Required Support Files 19.0.0.0.0
RHP Files for Common 19.0.0.0.0
RHP Files for CRS 19.0.0.0.0
RHP Files for DB 19.0.0.0.0
Secure Socket Layer 19.0.0.0.0
SQL*Plus 19.0.0.0.0
SQL*Plus Files for Instant Client 19.0.0.0.0
SQL*Plus Required Support Files 19.0.0.0.0
SSL Required Support Files for InstantClient 19.0.0.0.0
Tomcat Container 19.0.0.0.0
Tracle File Analyzer 19.0.0.0.0
Universal Storage Manager Files 19.0.0.0.0
XDK Required Support Files 19.0.0.0.0
XML Parser for Java 19.0.0.0.0
..................
注意:db1和db2都执行
As the Grid home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/33182768/33192793
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/33182768/33208123
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/33182768/33208107
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/33182768/33239955
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft/33182768/32585572
For Oracle home, as home user:
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft2/34416665/34419443
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /soft2/34416665/34444834
注意:db1和db2都执行
[grid@db1 ~]$ vi /tmp/patch_list_gihome.txt
/soft2/34416665/34419443
/soft2/34416665/34444834
/soft2/34416665/34428761
/soft2/34416665/34580338
/soft2/34416665/33575402
注意:grid账户执行
[grid@db1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
注意:oracle账户执行
[oracle@db1 ~]$ vi /tmp/patch_list_dbhome.txt
/soft2/34416665/34419443
/soft2/34416665/34444834
[oracle@db1 ~]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
[root@db01:/soft2]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft2/34416665 -analyze
OPatchauto session is initiated at Sat Nov 12 10:13:47 2022
System initialization log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2022-11-12_10-13-50AM.log.
Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2022-11-12_10-14-58AM.log
The id for this session is 6JFB
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0/grid
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db
Patch applicability verified successfully on home /u01/app/19.3.0/grid
Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
Executing patch validation checks on home /u01/app/19.3.0/grid
Patch validation checks successfully completed on home /u01/app/19.3.0/grid
Executing patch validation checks on home /u01/app/oracle/product/19.3.0/db
Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/db
Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/db
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
OPatchAuto successful.
--------------------------------Summary--------------------------------
Analysis for applying patches has completed successfully:
Host:hisdb01
CRS Home:/u01/app/19.3.0/grid
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft2/34416665/33575402
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Reason: /soft2/34416665/33575402 is not required to be applied to oracle home /u01/app/19.3.0/grid
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft2/34416665/34444834
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Patch: /soft2/34416665/34428761
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Patch: /soft2/34416665/34580338
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Patch: /soft2/34416665/34419443
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Host:hisdb01
RAC Home:/u01/app/oracle/product/19.3.0/db
Version:19.0.0.0.0
==Following patches were SKIPPED:
Patch: /soft2/34416665/34428761
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/34580338
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY analyzed to be applied:
Patch: /soft2/34416665/34444834
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
Patch: /soft2/34416665/34419443
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-15-20AM_1.log
OPatchauto session completed at Sat Nov 12 10:18:58 2022
Time taken to complete the session 5 minutes, 11 seconds
[root@hisdb01:/soft2]# /u01/app/19.3.0/grid/OPatch/opatchauto apply /soft2/34416665 -oh /u01/app/19.3.0/grid
OPatchauto session is initiated at Sat Nov 12 10:27:25 2022
System initialization log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2022-11-12_10-27-32AM.log.
Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2022-11-12_10-27-43AM.log
The id for this session is CEQ3
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0/grid
Patch applicability verified successfully on home /u01/app/19.3.0/grid
Executing patch validation checks on home /u01/app/19.3.0/grid
Patch validation checks successfully completed on home /u01/app/19.3.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.3.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/hisdb01/crsconfig/crs_prepatch_apply_inplace_hisdb01_2022-11-12_10-28-48AM.log
CRS service brought down successfully on home /u01/app/19.3.0/grid
Start applying binary patch on home /u01/app/19.3.0/grid
Binary patch applied successfully on home /u01/app/19.3.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.3.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/hisdb01/crsconfig/crs_postpatch_apply_inplace_hisdb01_2022-11-12_10-40-56AM.log
CRS service started successfully on home /u01/app/19.3.0/grid
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:hisdb01
CRS Home:/u01/app/19.3.0/grid
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft2/34416665/33575402
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-28-02AM_1.log
Reason: /soft2/34416665/33575402 is not required to be applied to oracle home /u01/app/19.3.0/grid
==Following patches were SUCCESSFULLY applied:
Patch: /soft2/34416665/34419443
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-32-17AM_1.log
Patch: /soft2/34416665/34428761
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-32-17AM_1.log
Patch: /soft2/34416665/34444834
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-32-17AM_1.log
Patch: /soft2/34416665/34580338
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-32-17AM_1.log
OPatchauto session completed at Sat Nov 12 10:45:26 2022
Time taken to complete the session 18 minutes, 2 seconds
opatch lspatches
34580338;TOMCAT RELEASE UPDATE 19.0.0.0.0 (34580338)
34444834;OCW RELEASE UPDATE 19.17.0.0.0 (34444834)
34428761;ACFS RELEASE UPDATE 19.17.0.0.0 (34428761)
34419443;Database Release Update : 19.17.0.0.221018 (34419443)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
OPatch succeeded.
/u01/app/19.3.0/grid/OPatch/opatchauto apply /soft2/34416665 -oh /u01/app/19.3.0/grid
OPatchauto session is initiated at Sat Nov 12 10:46:23 2022
System initialization log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchautodb/systemconfig2022-11-12_10-46-31AM.log.
Session log file is /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/opatchauto2022-11-12_10-46-45AM.log
The id for this session is 2VY6
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0/grid
Patch applicability verified successfully on home /u01/app/19.3.0/grid
Executing patch validation checks on home /u01/app/19.3.0/grid
Patch validation checks successfully completed on home /u01/app/19.3.0/grid
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.3.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/hisdb02/crsconfig/crs_prepatch_apply_inplace_hisdb02_2022-11-12_10-48-05AM.log
CRS service brought down successfully on home /u01/app/19.3.0/grid
Start applying binary patch on home /u01/app/19.3.0/grid
Binary patch applied successfully on home /u01/app/19.3.0/grid
Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.3.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/hisdb02/crsconfig/crs_postpatch_apply_inplace_hisdb02_2022-11-12_11-00-02AM.log
CRS service started successfully on home /u01/app/19.3.0/grid
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:hisdb02
CRS Home:/u01/app/19.3.0/grid
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft2/34416665/33575402
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-47-06AM_1.log
Reason: /soft2/34416665/33575402 is not required to be applied to oracle home /u01/app/19.3.0/grid
==Following patches were SUCCESSFULLY applied:
Patch: /soft2/34416665/34419443
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-51-27AM_1.log
Patch: /soft2/34416665/34428761
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-51-27AM_1.log
Patch: /soft2/34416665/34444834
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-51-27AM_1.log
Patch: /soft2/34416665/34580338
Log: /u01/app/19.3.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_10-51-27AM_1.log
OPatchauto session completed at Sat Nov 12 11:04:35 2022
Time taken to complete the session 18 minutes, 12 seconds
opatch lspatches
34580338;TOMCAT RELEASE UPDATE 19.0.0.0.0 (34580338)
34444834;OCW RELEASE UPDATE 19.17.0.0.0 (34444834)
34428761;ACFS RELEASE UPDATE 19.17.0.0.0 (34428761)
34419443;Database Release Update : 19.17.0.0.221018 (34419443)
33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)
OPatch succeeded.
注意:db1
/u01/app/oracle/product/19.3.0/db/OPatch/opatchauto apply /soft2/34416665 -oh /u01/app/oracle/product/19.3.0/db
OPatchauto session is initiated at Sat Nov 12 11:43:50 2022
System initialization log file is /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchautodb/systemconfig2022-11-12_11-43-56AM.log.
Session log file is /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/opatchauto2022-11-12_11-44-20AM.log
The id for this session is 36M8
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db
Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
Executing patch validation checks on home /u01/app/oracle/product/19.3.0/db
Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/db
Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/db
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
Preparing to bring down database service on home /u01/app/oracle/product/19.3.0/db
Successfully prepared home /u01/app/oracle/product/19.3.0/db to bring down database service
Bringing down database service on home /u01/app/oracle/product/19.3.0/db
Following database(s) and/or service(s) are stopped and will be restarted later during the session: hiptn
Database service successfully brought down on home /u01/app/oracle/product/19.3.0/db
Performing prepatch operation on home /u01/app/oracle/product/19.3.0/db
Prepatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db
Start applying binary patch on home /u01/app/oracle/product/19.3.0/db
Binary patch applied successfully on home /u01/app/oracle/product/19.3.0/db
Performing postpatch operation on home /u01/app/oracle/product/19.3.0/db
Postpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db
Starting database service on home /u01/app/oracle/product/19.3.0/db
Database service successfully started on home /u01/app/oracle/product/19.3.0/db
Preparing home /u01/app/oracle/product/19.3.0/db after database service restarted
No step execution required.........
Trying to apply SQL patch on home /u01/app/oracle/product/19.3.0/db
No sqlpatch operations are required on the local node for this home
SQL patch applied successfully on home /u01/app/oracle/product/19.3.0/db
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:hisdb01
RAC Home:/u01/app/oracle/product/19.3.0/db
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft2/34416665/34428761
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/34580338
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:
Patch: /soft2/34416665/34419443
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_11-47-47AM_1.log
Patch: /soft2/34416665/34444834
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_11-47-47AM_1.log
OPatchauto session completed at Sat Nov 12 11:58:26 2022
Time taken to complete the session 14 minutes, 37 seconds
/u01/app/oracle/product/19.3.0/db/OPatch/opatchauto apply /soft2/34416665 -oh /u01/app/oracle/product/19.3.0/db
OPatchauto session is initiated at Sat Nov 12 12:04:12 2022
System initialization log file is /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchautodb/systemconfig2022-11-12_12-04-17PM.log.
Session log file is /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/opatchauto2022-11-12_12-04-44PM.log
The id for this session is ADBR
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.3.0/db
Patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
Executing patch validation checks on home /u01/app/oracle/product/19.3.0/db
Patch validation checks successfully completed on home /u01/app/oracle/product/19.3.0/db
Verifying SQL patch applicability on home /u01/app/oracle/product/19.3.0/db
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.3.0/db
Preparing to bring down database service on home /u01/app/oracle/product/19.3.0/db
Successfully prepared home /u01/app/oracle/product/19.3.0/db to bring down database service
Bringing down database service on home /u01/app/oracle/product/19.3.0/db
Following database(s) and/or service(s) are stopped and will be restarted later during the session: hiptn
Database service successfully brought down on home /u01/app/oracle/product/19.3.0/db
Performing prepatch operation on home /u01/app/oracle/product/19.3.0/db
Prepatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db
Start applying binary patch on home /u01/app/oracle/product/19.3.0/db
Binary patch applied successfully on home /u01/app/oracle/product/19.3.0/db
Performing postpatch operation on home /u01/app/oracle/product/19.3.0/db
Postpatch operation completed successfully on home /u01/app/oracle/product/19.3.0/db
Starting database service on home /u01/app/oracle/product/19.3.0/db
Database service successfully started on home /u01/app/oracle/product/19.3.0/db
Preparing home /u01/app/oracle/product/19.3.0/db after database service restarted
No step execution required.........
Trying to apply SQL patch on home /u01/app/oracle/product/19.3.0/db
SQL patch applied successfully on home /u01/app/oracle/product/19.3.0/db
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:hisdb02
RAC Home:/u01/app/oracle/product/19.3.0/db
Version:19.0.0.0.0
Summary:
==Following patches were SKIPPED:
Patch: /soft2/34416665/34428761
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"
Patch: /soft2/34416665/34580338
Reason: This patch is not applicable to this specified target type - "rac_database"
==Following patches were SUCCESSFULLY applied:
Patch: /soft2/34416665/34419443
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_12-08-34PM_1.log
Patch: /soft2/34416665/34444834
Log: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatchauto/core/opatch/opatch2022-11-12_12-08-34PM_1.log
OPatchauto session completed at Sat Nov 12 12:25:09 2022
Time taken to complete the session 20 minutes, 58 seconds
crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.chad
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.net1.network
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
ora.ons
ONLINE ONLINE db1 STABLE
ONLINE ONLINE db2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 ONLINE OFFLINE STABLE
ora.DATA.dg(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE db1 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE db1 Started,STABLE
2 ONLINE ONLINE db2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE db1 STABLE
2 ONLINE ONLINE db2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE db1 STABLE
ora.db1.vip
1 ONLINE ONLINE db1 STABLE
ora.db2.vip
1 ONLINE ONLINE db2 STABLE
ora.his.db
1 ONLINE ONLINE db1 Open,HOME=/u01/app/o
racle/product/19.3.0
/db,STABLE
2 ONLINE ONLINE db2 Open,HOME=/u01/app/o
racle/product/19.3.0
/db,STABLE
ora.qosmserver
1 ONLINE ONLINE db1 STABLE
ora.scan1.vip
1 ONLINE ONLINE db1 STABLE
--------------------------------------------------------------------------------
安装补丁之后,还需要将有变化的SQL加载到数据库中,这里可以直接运行Datapatch工具将这些修改的SQL重新加载到数据库中,RAC环境,只需要在一个节点执行就可以了。
根据readme的说明,操作步骤如下:
sqlplus /nolog
SQL> Connect / as sysdba
SQL> startup
SQL> alter pluggable database all open;
SQL> quit
[oracle@db1 ~]$ cd $ORACLE_HOME/OPatch
[oracle@db1:/u01/app/oracle/product/19.3.0/db/OPatch]$ ./datapatch -verbose
SQL Patching tool version 19.17.0.0.0 Production on Sat Nov 12 12:44:37 2022
Copyright (c) 2012, 2022, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_226083_2022_11_12_12_44_37/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
19.17.0.0.0 Release_Update 220924224051: Installed
SQL registry:
Applied 19.17.0.0.0 Release_Update 220924224051 successfully on 12-NOV-22 12.25.06.869301 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
No interim patches need to be rolled back
No release update patches need to be installed
No interim patches need to be applied
SQL Patching tool complete on Sat Nov 12 12:44:56 2022
> @?/rdbms/admin/utlrp.sql
Session altered.
TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2022-11-12 12:45:29
DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC> objects in the database. Recompilation time is proportional to the
DOC> number of invalid objects in the database, so this command may take
DOC> a long time to execute on a database with a large number of invalid
DOC> objects.
DOC>
DOC> Use the following queries to track recompilation progress:
DOC>
DOC> 1. Query returning the number of invalid objects remaining. This
DOC> number should decrease with time.
DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC> 2. Query returning the number of objects compiled so far. This number
DOC> should increase with time.
DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC> This script automatically chooses serial or parallel recompilation
DOC> based on the number of CPUs available (parameter cpu_count) multiplied
DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC> On RAC, this number is added across all RAC nodes.
DOC>
DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC> recompilation. Jobs are created without instance affinity so that they
DOC> can migrate across RAC nodes. Use the following queries to verify
DOC> whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC> 1. Query showing jobs created by UTL_RECOMP
DOC> SELECT job_name FROM dba_scheduler_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC> 2. Query showing UTL_RECOMP jobs that are running
DOC> SELECT job_name FROM dba_scheduler_running_jobs
DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#
PL/SQL procedure successfully completed.
TIMESTAMP
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END 2022-11-12 12:45:48
DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#
OBJECTS WITH ERRORS
-------------------
0
DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC> logged into this table: they go into DBA_ERRORS instead.
DOC>#
ERRORS DURING RECOMPILATION
---------------------------
0
Function created.
PL/SQL procedure successfully completed.
Function dropped.
PL/SQL procedure successfully completed.
set linesize 180
col ACTION for a15
col ACTION_TIME for a30
col COMMENTS for a78
col VERSION for a12
select action_time,action,version,comments from dba_registry_history;
ACTION_TIME ACTION VERSION COMMENTS
------------------------------ --------------- ------------ ------------------------------------------------------------------------------
BOOTSTRAP 19 RDBMS_19.17.0.0.0DBRU_LINUX.X64_220924
31-OCT-22 07.36.23.613394 PM RU_APPLY 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.14.0.0.0: Release_Update - 211225122123
12-NOV-22 12.24.53.682729 PM RU_APPLY 19.0.0.0.0 Patch applied from 19.14.0.0.0 to 19.17.0.0.0: Release_Update - 220924224051
注意:节点1
col action for a15
col status for a15
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- ---------- --------------- --------------- ---------------
33515361 RU APPLY SUCCESS 19.14.0.0.0
34419443 RU APPLY SUCCESS 19.17.0.0.0
注意:节点2
col action for a15
col status for a15
select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;
PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION
---------- ------------------------------ --------------- --------------- ---------------------------------------------
33515361 RU APPLY SUCCESS 19.14.0.0.0
34419443 RU APPLY SUCCESS 19.17.0.0.0