Focus On Oracle

Installing, Backup & Recovery, Performance Tuning,
Troubleshooting, Upgrading, Patching

Oracle Engineered System


当前位置: 首页 » 技术文章 » Oracle 12c+

通过opatchauto升级Oracle RAC Database(19.3.0-->19.5.0)

补丁(patch)可以理解为为解决现运行的代码或软件在功能上的缺陷而设计开发的一小段代码。包括修复安全漏洞、错误、提高可用性、性能等。 下面是正常应用补丁的流程图。可参考下面的 note。

在 GRID/RAC 环境下,从 12c 开始我们可以通过 root 用户使用 opatchauto 命令安装 patch。还可以借助 oplan 生成应用补丁的计划。这个工具很方便,大大简化了 DBA 的工作量。12c 以后可以通过 opatchauto 去应用补丁,去处了很多繁琐的步骤,可以说是一键搞定。对于数据库管理员或者维护人员来说,这是个非常友好的工具,强烈推荐使用该工具。


实验环境

本次实验使用的基于 Oracle Enterprise Linux 7.7,Oracle GI 19.4 和 Oracle Database 19.3,然后通过应用补丁 30125133 把数据库 19.3 升级到 19.5。可以通过 2118136.2 找到相关的补丁。具体信息如下:


点击此处下载完整实验文档

前置条件

1.检查并确认opatch版本满足要求

2检查补丁冲突,在正式应用之前,确保补丁不冲突。可以通过下面任意一种方式

  通过opatch检查

    $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

  通过opatchauto检查:

    [root@xd08mdb01 30125133]# /u01/ordb/oracle/product/193/OPatch/opatchauto apply -analyze -oh /u01/ordb/oracle/product/193

通过opatchauto应用补丁

[root@xd08mdb01 30125133]# /u01/ordb/oracle/product/193/OPatch/opatchauto apply -oh /u01/ordb/oracle/product/193


OPatchauto session is initiated at Mon Jan 13 12:16:26 2020

System initialization log file is /u01/ordb/oracle/product/193/cfgtoollogs/opatchautodb/systemconfig2020-01-13_12-16-32PM.log.

Session log file is /u01/ordb/oracle/product/193/cfgtoollogs/opatchauto/opatchauto2020-01-13_12-17-03PM.log
The id for this session is JGPD

Executing OPatch prereq operations to verify patch applicability on home /u01/ordb/oracle/product/193
Patch applicability verified successfully on home /u01/ordb/oracle/product/193

Verifying SQL patch applicability on home /u01/ordb/oracle/product/193
SQL patch applicability verified successfully on home /u01/ordb/oracle/product/193

Preparing to bring down database service on home /u01/ordb/oracle/product/193
Successfully prepared home /u01/ordb/oracle/product/193 to bring down database service

Bringing down database service on home /u01/ordb/oracle/product/193
Following database(s) and/or service(s) are stopped and will be restarted later during the session: pgold
Database service successfully brought down on home /u01/ordb/oracle/product/193

Performing prepatch operation on home /u01/ordb/oracle/product/193
Perpatch operation completed successfully on home /u01/ordb/oracle/product/193

Start applying binary patch on home /u01/ordb/oracle/product/193
Binary patch applied successfully on home /u01/ordb/oracle/product/193

Performing postpatch operation on home /u01/ordb/oracle/product/193
Postpatch operation completed successfully on home /u01/ordb/oracle/product/193

Starting database service on home /u01/ordb/oracle/product/193
Database service successfully started on home /u01/ordb/oracle/product/193

Preparing home /u01/ordb/oracle/product/193 after database service restarted
No step execution required.........

Trying to apply SQL patch on home /u01/ordb/oracle/product/193
SQL patch applied successfully on home /u01/ordb/oracle/product/193

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:xd08mdb01
RAC Home:/u01/ordb/oracle/product/193
Version:19.0.0.0.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /tmp/30125133
Log: /u01/ordb/oracle/product/193/cfgtoollogs/opatchauto/core/opatch/opatch2020-01-13_12-19-44PM_1.log

OPatchauto session completed at Mon Jan 13 12:25:26 2020
Time taken to complete the session 9 minutes, 1 second
[root@xd08mdb01 30125133]#
有用的MOS Note
Oracle Database - Overview of Database Patch Delivery Methods for 12.2.0.1 and greater (Doc ID 2337415.1)
Oracle Database - Overview of Database Patch Delivery Methods - 12.1.0.2 and older (Doc ID 1962125.1)
Master Note for Database Proactive Patch Program (Doc ID 756671.1)
Release Schedule of Current Database Releases (Doc ID 742060.1)
Master Note for Database Proactive Patch Program (Doc ID 756671.1)
Oracle Database 19c Proactive Patch Information (Doc ID 2521164.1)
Oracle Database - Overview of Database Patch Delivery Methods - 12.1.0.2 and older (Doc ID 1962125.1)
Troubleshooting Assistant: Patching Oracle Database/Client (Doc ID 1561792.2)
Assistant: Download Reference for Oracle Database/GI Update, Revision, PSU, SPU(CPU), Bundle Patches, Patchsets and Base Releases (Doc ID 2118136.2)
NOTE:293369.1 - Master Note For OPatch
NOTE:802103.1 - Oracle Recommended Patches -- Previous Oracle Database Recommended Patches
NOTE:274526.1 - How To Download And Install The Latest OPatch(6880880) Version
NOTE:1430923.1 - Patch Nomenclature for Oracle Products
NOTE:148054.1 - Oracle Database 8.1.7 (8i) & 8.1.7.x (8i) Notice 2 of 2
NOTE:1071023.1 - How to Request Software Media when it is Unavailable on the Oracle Software Delivery Cloud Site
NOTE:161549.1 - Oracle Database, CRS, ASM, Networking and EM Agent Patches for Microsoft Platforms
NOTE:756671.1 - Master Note for Database Proactive Patch Program
NOTE:1929745.1 - Oracle Recommended Patches -- "Oracle JavaVM Component Database PSU and Update" (OJVM PSU and OJVM Update) Patches
NOTE:1963039.1 - Latest Patch Set Update and Critical Patch Update Availability Document
NOTE:1351428.1 - Information Center: Patching and Maintaining Oracle Database Server/Client Installations
NOTE:1581950.1 - Database Security Patching from 12.1.0.1 onwards
NOTE:783141.1 - Reference List of Critical Patch Update Availability(CPU) and Patch Set Update (PSU) Documents For Oracle Database and Fusion Middleware Product
Datapatch: Database 12c or later Post Patch SQL Automation (Doc ID 1585822.1)

Reference

https://docs.oracle.com/cd/E24628_01/doc.121/e39376/opatchauto.htm#OPTCH620


关键词:datapatch autopatch 

相关文章

在Oracle RAC ADG中通过opatchauto应用补丁(19.5.0-->19.5.1)
通过opatchauto升级Oracle RAC Database(19.3.0-->19.5.0)
Top