Oracle 单实例19.11升级到19.12

本文详细介绍了如何将Oracle单实例数据库从19.11版本升级到19.12版本,包括下载RU补丁,检查OPatch版本,应用补丁,加载SQL变化以及处理无效对象等关键步骤。
摘要由CSDN通过智能技术生成

1.查看当前DB环境

[oracle@db01 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)
[oracle@db01 ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 13-SEP-2021 21:33:46

Copyright (c) 1991, 2021, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db01)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date                13-SEP-2021 21:33:43
Uptime                    0 days 0 hr. 0 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/db01/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

[oracle@db01 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Sep 13 21:31:54 2021
Version 19.11.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Connected to an idle instance.
SQL>  show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 HBHE                           READ WRITE NO

2 从MOS下载19.12 的RU 补丁

19.12 DB的RU 编号是:32904851,GI的RU编号是: 32895426。
p32904851_190000_Linux-x86-64.zip
p32895426_190000_Linux-x86-64.zip

3 开始安装RU补丁

3.1 查看OPatch版本

[oracle@db01 OPatch]$ cd $ORACLE_HOME/OPatch
[oracle@db01 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.27

OPatch succeeded.

3.2 检查Patch是否冲突

[oracle@db01 tmp]$ cd /tmp/32904851/
[oracle@db01 32904851]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.27
Copyright (c) 2021, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/19.3.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.27
OUI version       : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch2021-09-13_21-49-13PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

3.3 应用patch

如果是物理DG,那么主备库都需要安装Patch,可以先在备库安装,再安装主库,操作步骤可以参考:Document 278641.1。
对于RAC 环境,可以使用OPatch rolling 方式来安装,这样没有停机时间,具体操作可以参考:Document 244241.1。
对于单实例,必须关闭待升级ORACLE HOME关联的所有实例和监听,并且包括退出所有的sqlplus窗口。
关闭实例和监听,并退出sqlplus。

[oracle@db01 OPatch]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 13-SEP-2021 21:52:15

Copyright (c) 1991, 2021, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db01)(PORT=1521)))
The command completed successfully
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACL
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值