Disable Oracle Active Data Guard

Official Oracle support notice: There is no way to disable ADG, just prevent its usage by ensuring the physical standby database is always mounted when Media Recovery (MRP) runs.

I think it’s to easy to get Active Data Guard running. If you accidentally open your standby database (first) and get Data Guard up and running, you automagically have made your standby database read only mode and have the Active Data Guard enabled.

There is a ‘underscore’ parameter which can be set to disable ADG. This means that a standby database can not be opened and keeps being in mount mode; yeah!

Unfortunately it’s an ‘underscore’ parameter and Oracle support does NOT(!) advices it to use it: Doc ID 2269239.1:
NOTE: Hidden parameter “_query_on_physical” is NOT an option to prevent Active Data Guard usage. It should NOT be used at all in any version of the Oracle Database. It is unsupported to be set unless Oracle Support advises it for diagnostic reasons.

SQL> alter system set "_query_on_physical"=false scope=spfile;
System altered.

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.
(...)
Database mounted.
ORA-16669: instance cannot be opened because the Oracle Active Data Guard option is disabled

SQL> select database_role, open_mode from v$database;
DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY MOUNTED

Good luck!

Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *