0

I would to ask some question regarding Oracle Active Data Guard.

Currently, we are looking for an efficient way to get a real-time backup of Oracle Database. We tried to apply Oracle Active Data Guard on our testing servers running Windows Server 2012 R2 and an unlicensed Oracle 11g R2.

We applied these commands on the Physical Standby Server:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE OPEN READ ONLY;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

We checked the OPEN_MODE status of the database:

SQL> select database_role, open_mode from v$database;

We got this as a result:

DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY

We tried to restart the Oracle Service (to simulate sudden power fluctuation or unintentional server shutdown). The OPEN_MODE status becomes:

DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY

Is it by default that the OPEN_MODE status became READ ONLY if we restart the service? Or do we really need to have a license to fully access Oracle Active Data Guard features so that the OPEN_MODE status will remain in READ ONLY WITH APPLY permanently even if we restart the Oracle server?

0

When working with DataGuard, I would strongly advise using the DataGuard Broker (dgmgrl).

It greatly simplifies the cluster management process and is the tool of choice for interrogating and diagnosing problems with the cluster.

dgmgrl / 
DGMGRL> show configuration
. . . 
DGMGRL> show database PRIMARY_DB
. . . 
DGMGRL> show database STANDBY_DB
. . . 
0

1. No Active Data Guard

Usually standby database is in Mount state and in Recovery mode (applies changes from primary). Queries to user data will not work because DB is mounted, but not open. If we want to open db then we have to stop recovery and then open DB.

So archive logs will continue to come but will not apply - the db is unchangeble. If table was updated on primary - on standby we will not see this changes.

2. With Active Data Guard

Usually ADG Standby database is in Open state and in Recovery Mode. And queries return (almost) current data - if table is changed on primary - it is changed on standby. ADG standby is useful when we want to unload some high load queries(reports) from primary server. If the main reason for Data Guard is HA/DR, then there is no need for ADG license.

When we restart oracle service on windows, it's open database.

So run regedit, somewhere like HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraDb11g_home1 change ORA_xxxxx_AUTOSTART to false, where xxxxx - is your oracle instance name. Now start of service will not start oracle instance. You need manually, or in script, run

startup mount
recover managed standby ... 

If you set up DataGuard Broker, then there is no need to run the recover statement - broker will run it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.