上篇文章
我只在中间备库环境应用了PSU,解决了级联备库从中间备库duplicate数据库的问题:
细心的朋友已经发现,因为是备库环境,并没有做数据库执行相关脚本部分,所以如果去DB查询补丁应用信息是没有的:
SQL> r
1* select * from dba_registry_history
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
本篇文章就继续把级联备库以及主库的PSU软件补丁打上,步骤和上篇无区别,不再赘述。
最后要在主库按照readme执行对应脚本(只需在主库执行哦,通过ADG基理会将这些改变自动同步到备库):
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
再次看状态:
set lines 1000
select * from dba_registry_history;
SQL> set lines 1000
select * from dba_registry_history;SQL>
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM APPLY SERVER 11.2.0.3 15 PSU PSU 11.2.0.3.15
最后去备库,以及级联备库分别确认同步状态:
备库状态:已有11.2.0.3.15信息
[oracle@db11gadg ~]$
SQL> @dg
NAME VALUE UNIT TIME_COMPUTED DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag +00 00:00:00 day(2) to second(0) interval 05/22/2023 16:56:04 05/22/2023 16:56:03
apply lag +00 00:00:00 day(2) to second(0) interval 05/22/2023 16:56:04 05/22/2023 16:56:03
apply finish time +00 00:00:00.000 day(2) to second(3) interval 05/22/2023 16:56:04
estimated startup time 9 second 05/22/2023 16:56:04
SQL> set lines 1000
select * from dba_registry_history;SQL>
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM APPLY SERVER 11.2.0.3 15 PSU PSU 11.2.0.3.15
级联备库状态:在主库切日志后也会有11.2.0.3.15信息:
[oracle@db11gcas ~]$
SQL> @dg
NAME VALUE UNIT TIME_COMPUTED DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag +00 00:00:48 day(2) to second(0) interval 05/22/2023 16:56:50 05/22/2023 16:56:06
apply lag +00 00:00:48 day(2) to second(0) interval 05/22/2023 16:56:50 05/22/2023 16:56:06
apply finish time day(2) to second(3) interval 05/22/2023 16:56:50
estimated startup time 9 second 05/22/2023 16:56:50
SQL> set lines 1000
select * from dba_registry_history;SQL>
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
SQL> /
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
--------------------------------------------------------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
17-SEP-11 10.21.11.595816 AM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
04-APR-23 04.37.58.780922 PM APPLY SERVER 11.2.0.3 0 PSU Patchset 11.2.0.2.0
22-MAY-23 04.55.20.039373 PM APPLY SERVER 11.2.0.3 15 PSU PSU 11.2.0.3.15
SQL> @dg
NAME VALUE UNIT TIME_COMPUTED DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag +00 00:00:00 day(2) to second(0) interval 05/22/2023 16:57:18 05/22/2023 16:57:11
apply lag +00 00:00:00 day(2) to second(0) interval 05/22/2023 16:57:18 05/22/2023 16:57:11
apply finish time day(2) to second(3) interval 05/22/2023 16:57:18
estimated startup time 9 second 05/22/2023 16:57:18
SQL> @dg
NAME VALUE UNIT TIME_COMPUTED DATUM_TIME
---------------------- ---------------------- ------------------------------ ------------------------------ ------------------------------
transport lag +00 00:00:56 day(2) to second(0) interval 05/22/2023 16:58:16 05/22/2023 16:58:07
apply lag +00 00:00:56 day(2) to second(0) interval 05/22/2023 16:58:16 05/22/2023 16:58:07
apply finish time day(2) to second(3) interval 05/22/2023 16:58:16
estimated startup time 9 second 05/22/2023 16:58:16
都没问题了,整个过程也符合PSU补丁应用逻辑。