Active Data Guard Licensing

Oracle Database Version 11g introduced a new feature called Active Data Guard.  This feature extended tradition Data Guard by allowing the standby database to continue to apply redo logs while remaining open for queries (read-only) transactions. 

To quote the Oracle (Active) Data Guard 19c white paper:

“One of the big advantages of Active Data Guard 19c is the better capability to offline read intensive applications to the standby. It is now possible to also issue occasional DML against the standby database, so this is now a fully functional reporting database. This leverages the return on investment as the primary database is used in a more optimal way and the resources of the DR system are used in an optimal way.”

Simply put, Active Data Guard means you can now use your standby database as a reporting database freeing up valuable cycles from your primary database.

Oracle (Active) Data Guard 19c White paper

To get a copy of Oracle (Active) Data Guard 19C issued March 17, 2019:

Data Guard Vs. Active Data Guard

Quoting the Oracle Documentation on Data Guard:

“Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data. Oracle Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruptions.”

Oracle Data Guard maintains these standby databases as copies of the production database. Then, if the production database becomes unavailable because of a planned or an unplanned outage, Oracle Data Guard can switch any standby database to the production role, minimizing the downtime associated with the outage. Oracle Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability. 

Both Data Guard and Active Data Guard provide additional copies of the database. 

With Data Guard, you can backup the standby copy of the database to offload resource consumption used by the backup process against the live production database. 

Note of Caution: Backing up from the standby can trigger ADG licensing if fast incremental backups are done from the standby.

Active Data Guard Allows You to Use Standby as a Read-Only Database

 With Active Data Guard, you can now use the copy of the database as a full-fledge reporting database. 

Active Data Guard Comes With a Cost

Active Data Guard carries a list price of $11,500 USD. There are situations where Active Data Guard licensing is not required on the primary and standby, best to discuss with a license expert to make sure you understand the limitations that come with not licensing both. 

Active Data Guard License Warning

The danger with Active Data Guard is that if you open the standby databases and do not realize that redo is being applied, it can trigger a requirement for a license.  By opening a standby database incorrectly, Active Data Guard can unknowingly be triggered, causing a potential licensing liability.

STANDBY Database Read-Only

A standby database can be opened in read only mode without the need for Active Data Guard licenses.  The steps to do this are as follows.  We will assume that the standby database is mounted and in managed recovery mode.

SQL> alter database recover managed standby database cancel;

SQL> alter database open read only;


This will open a standby database in read-only mode, allowing the users to run queries against the database.  

This will not trigger Active Data Guard usage in DBA_FEATURE_USAGE_STATISTICS. 

Important: The database will not perform any recovery while in read-only mode.  The standby database is no longer ready for immediate recovery. It is not applying the REDO logs. 

The steps to return the standby database to managed recovery mode and roll the database forward are as follows.

SQL> shutdown immediate;

SQL> startup mount;

SQL> alter database recover managed standby database disconnect;


Triggering Active Data Guard Without Warning

The licensing concern lies in the fact that Active Data Guard can be triggered without any warning. 

If the standby database is open in read only mode and managed recovery is running, Active Data Guard is triggered. Let me restate this. If Managed Recovery is running AND the database is in read-only mode, Active Data Guard is Triggered.  This creates a potential License audit issue.

Remember Active Data Guard carries a list price of $11,500 USD per processor.  Under your contractual obligations, it is not always a requirement to license both the primary and standby databases. 

SQL> alter database recover managed standby database cancel;

SQL> alter database open;


At this point, the standby database is open in read only mode and can be queried.  There is no ADG usage as the database is not recovering, however.

If a DBA comes along and notices that the standby database is falling behind, the instinct is to enable managed recovery.  If this happens, ADG is triggered and a licensing liability is incurred.

SQL> alter database recover managed standby database disconnect;


The exact same syntax is used to enable managed recovery with the database open in read only mode as with the database open in a mounted state.

To Avoid Usage of Active Data Guard

To avoid usage of ADG, it is important to query the state of the database prior to starting managed recovery.  The expected output is as follows:

SQL> select open_mode from v$database;





If open_mode shows as read only, then managed recovery cannot be started without triggering ADG usage.

SQL> select open_mode from v$database;





If managed recovery is started while the database is open as read only, the open_mode changes to the following:

SQL> select open_mode from v$database; 





If you want to open your Data Guard database as read only, and do not want to pay for Active Data Guard, then care must be taken when opening the standby database.  Beware that a licensing liability can easily (and unknowingly) be incurred for Active Data Guard.


USING _query_on_physical to disable Active Data Guard

We have seen blogs recommending using (_query_on_physical) to disable Active Data Guard. 

Let Us Be Clear

Do Not Do It

·      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.