Tuesday, November 15, 2022

Active Data Guard instances are not supported with DBMS_ROLLING

There is an earlier post on how to use dbms_rolling for database upgrade. The configuration used in that post consists of two instances. The data guard configuration this post is based on had three instances. One of them was is an active data guard instnace, open read only. This instance is to simulate a reader farm (Example 14-9 Rolling Upgrade on a Reader Farm). Below is the database names, their role and current open mode.
DB_UNIQUE_NAME   OPEN_MODE              DATABASE_ROLE
---------------- ----------             -------------
dgtest           READ WRITE             PRIMARY
dgtest2          MOUNTED                PHYSICAL STANDBY
dgtest3          READ ONLY WITH APPLY   PHYSICAL STANDBY
dgtest2 is designated as the future primary. This standby DB, as shown above is already in mount mode. MOS doc 2832235.1 states standby must be in mount mode.
SQL> exec DBMS_ROLLING.INIT_PLAN(future_primary=>'dgtest2');

PL/SQL procedure successfully completed.
However, when the build plan is called it gives the below error.
SQL> exec DBMS_ROLLING.BUILD_PLAN;
BEGIN DBMS_ROLLING.BUILD_PLAN; END;

*
ERROR at line 1:
ORA-45438: database is not in mounted mode
ORA-06512: at "SYS.DBMS_ROLLING", line 16
ORA-06512: at line 1
This is strange as the future primary, the standby that will be invovled in the switchover is already in mount mode but build plan is giving an error.
To see if the error is due to the active data guard instance (dgtest3), that instance was closed and started in mount mode. The build plan executes without error. So it seems all instances must be in mount mode for build plan to work. This means any application that rely on reader farm will incur down time.



After raising a SR Oracle confirmed that this is a bug and gave the following "Bug 25882840 : ACTIVE DATA GUARD NOT PERMITTED AS DBMS_ROLLING MEMBER". Unfortunately this is an internal bug so couldn't get much details on it. There was also no ETA on thie fix for the bug nor confirmation that ADG will be supported in the future.

Related MOS Docs
Oracle Exadata Database Service 19c Rolling Upgrade with DBMS_ROLLING from Oracle Database 12.1.0.2 [ID 2889464.1]
Exadata Cloud Database 19c Rolling Upgrade With DBMS_ROLLING [ID 2832235.1]

Related Posts
Upgrading Oracle Restart Databases From 12.2 to 18c Using DBMS_ROLLING
DG Broker Continue With Status "ROLLING DATABASE MAINTENANCE IN PROGRESS" Even After ROLLBACK_PLAN is Called