Linux 7.9 平台下 Oracle DG 19.3升级至19.12

本文详细介绍了在Linux 7.9系统上,如何将Oracle Data Guard的19.3版本升级到19.12版本的步骤,包括检查主备库状态、关闭与启动实例、升级OPatch和RU、执行Datapatch工具以及验证升级效果。升级过程中强调了主备库的切换顺序以及备库无需执行datapatch工具。
摘要由CSDN通过智能技术生成

在19c 的Data Guard 环境,我们RU的升级可以直接按照Patch readme中的步骤进行,如下:
1.停备库
2.升级Opatch
3.升级备库(RU)
4.启动备库
5.停主库
6.升级OPatch
7.升级主库(RU+datapatch+utlrp)
8.启动主库

1.检查主库状态

SQL> col status for a15
SQL> col error for a20
SQL> select status,error from v$archive_dest where dest_id=2;

STATUS          ERROR
--------------- --------------------
VALID

SQL> select process,status,sequence# from v$managed_standby;

PROCESS                     STATUS           SEQUENCE#
--------------------------- --------------- ----------
DGRD                        ALLOCATED                0
ARCH                        CLOSING                 28
DGRD                        ALLOCATED                0
ARCH                        CLOSING                 28
ARCH                        CONNECTED                0
ARCH                        CLOSING                 29
DGRD                        ALLOCATED                0
LGWR                        WRITING                 30

8 rows selected.

检查备库
SQL> select process,status,sequence# from v$managed_standby;

PROCESS                     STATUS                                SEQUENCE#
--------------------------- ------------------------------------ ----------
ARCH                        CONNECTED                                     0
DGRD                        ALLOCATED                                     0
DGRD                        ALLOCATED                                     0
ARCH                        CLOSING                                      29
ARCH                        CLOSING                                      28
ARCH                        CONNECTED                                     0
RFS                         IDLE                                          0
RFS                         IDLE                                         30
RFS                         IDLE                                          0
MRP0                        APPLYING_LOG                                 30

10 rows selected.

2 关闭备库

关闭备库实例,监听,退出所有的sqlplus 窗口。

[oracle@dg02 ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sun Sep 19 12:10:06 2021
Version 19.3.0.0.0

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


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@dg02 ~]$ lsnrctl stop

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-SEP-2021 12:12:58

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dg01)(PORT=1521)))
The command completed successfully

3 升级备库OPatch

[oracle@dg02 32545013]$ cd $ORACLE_HOME/OPatch/
[oracle@dg02 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.
[oracle@dg02 32545013]$ cd $ORACLE_HOME
[oracle@dg02 dbhome_1]$ mv OPatch/ OPatchbak 
[oracle@dg02 dbhome_1]$ unzip /tmp/p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@dg02 OPatch]$ cd /u01/app/oracle/product/19.3.0/dbhome_1/OPatch
[oracle@dg02 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.27

OPatch succeeded.

4 升级备库RU

[root@dg02 ~]# yum install -y psmisc
[oracle@dg02 32904851]$ cd /tmp/32904851/
[oracle@dg02 32904851]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.27
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


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-19_12-35-39PM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 12.2.0.1.27
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


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-19_12-36-31PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   32904851  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/19.3.0/dbhome_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '32904851' to OH '/u01/app/oracle/product/19.3.0/dbhome_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.rdbms.tg4db2, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.oid.client, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.options.olap, 19.0.0.0.0 ] , [ oracle.options.olap.api, 19.0.0.0.0 ] , [ oracle.xdk.companion, 19.0.0.0.0 ] , [ oracle.rdbms.tg4ifmx, 19.0.0.0.0 ] , [ oracle.ons.eons.bwcompat, 19.0.0.0.0 ] , [ oracle.rdbms.tg4tera, 19.0.0.0.0 ] , [ oracle.ons.cclient, 19.0.0.0.0 ] , [ oracle.rdbms.tg4sybs, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.rdbms.tg4msql, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.perlint, 5.28.1.0.0..
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值