Oracle Dataguard for Business Continuity


Today I am going to cover Dataguard which is used for business continuity for Oracle Applications 11i including fusion middleware (Using AS Guard). There are two types of standby databases Physical Standby Database & Logical Standby database. Since oracle applications currently support only physical standby database , I am going to cover only physical standby databases.

Overview of Dataguard & Dataguard Broker
Dataguard consist of one primary database & one or more standby database where primary & standby databases are connected by sqlnet (How to configure this check in coming posts). These primary & standby database can be monitored by command line (sql) as well from GUI (Graphical User Interface) Tool called as Dataguard broker.

Important Services in Dataguard configuration
Two very important services in dataguard configuration are Redo Transport Service & Log Apply Services. In order to keep standby database in synch with primary database ; redo transport service transfer(Pull/Push) redo logs from primary to standby database & Log apply service applies that redo logs to standby database.

Switchover & Failover
These are basically two kind of roles in dataguard Failover & Switchover; In Switchover Primary database becomes standby database & one of (If there are more than one standby) standby database becomes primary database for ex. during server maintenance. Failover is used in scenarion in which your primary database is not available and you want to convert role of one of standby database to primary database for ex. during primary database failure.

Data Protection Mode
Standby database in dataguard configuration can be configured in any of three protection mode which can be changed later as well depending on your requirement . These protection modes are Maximum Protection Mode , Maximum Availability Mode & Maximum Performance Mode.

Maximum Protection Mode
In maximum protection mode as name suggest no data loss will occur if primary database fails. This is achieved by oracle by ensuring that redo data must be written to both local online redo log location & standby redo log location before transaction commits. This standby redo log will ensure full data protection. For full protection mode atleast one standby database should have standby redo log and LGWR, SYNC, and AFFIRM attribute should be used with LOG_ARCHIVE_DEST_n parameter. (I am going to discuss about these parameters in next post)
Here your primary database will shutdown if it is unable to write redo records to atleast one standby location.

Maximum Availability Mode
This is similar to Maximum protection mode except that it will not shutdown primary database if primary database is not able to write standby redo logs to atleast one standby location but in that case Maximum Availability will act in Maximum Performance Mode until fault is corrected and all gaps in redo logs are resolved. Once all gaps are resolved primary database will automatically goes into Maximum Availability Mode.

Maximum Performance Mode
This is default mode in which redo stream is written asynchronously with respect to the commitment of the transactions that create the redo data. You can use LGWR and ASYNC attribute or ARCH attribute in LOG_ARCHIVE_DEST_n

You can check your database mode as

SQL> select PROTECTION_LEVEL from v$database;
PROTECTION_LEVEL
—————————-
MAXIMUM PERFORMANCE

How to change protection modes..
How many standby database Instance you can configure …
explanation on Log apply, log transport service , FAL Server/Client ….
Step by step configuration of standby database using dataguard ..

Coming soon…

References
http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/toc.htm

About the Author Atul Kumar

Oracle ACE, Author, Speaker and Founder of K21 Technologies & K21 Academy : Oracle Gold Partner specialising in Design, Implement, and Trainings.

follow me on:

Leave a Comment:

22 comments
Anonymous says November 27, 2006

Hi Atul,

Could you please tell if i can configure Data gaurd set up on my machine alone(primary and stndby on single machine). I know Dataguard needs stndby DB at remote site, but for my learning purpose can i configure dataguard on same machine.

Thanks,
Anil

Reply
Atul Kumar says November 27, 2006

Yes Anil,
You can very well configure Dataguard on same machine for learning purpose but you need to take care of few things like db_file_convert (Exact syntax I’ll take up in a day or two) so that standby database can create file accourding to new mount point.

Atul

Reply
Anonymous says November 27, 2006

Hi Atul ,

FYI ONLY : Why Oracle Apps 11i does not support Logical Standby database ?

Answer : BEcuase Oracle Apps 11i database lot of objects which are not supported by Logical standby database like functional indexes etc etc . Oracle has got plans to improve the logical standby concept in the new release as logical standby database can help in reporting env creation etc

Thanks

Vivek

Reply
Atul Kumar says November 27, 2006

Vivek,
Thanks for sharing this with us all.
I think another big plus with logical standby is that rolling upgrade (Instance available to use for updtes while database upgarde) is supported in logical standby which I suppose will take few more years in physical standby .

Reply
Atul Kumar says December 8, 2006

Kevin for satndby important thing is software , you can install any type of database as long as software binaries match in primary & standby database .

Once you bring standby control file, datafile & initialization file from primary to standby , your primary data, initialization & control file will be overwritten ….

Reply
Anonymous says December 26, 2006

Might sound silly but i understand from ur post that data guards are of 2 types and its used for business continuity… but could you please explain what dataguard actually is?? may be by giving an example..

Thanks

Reply
Atul Kumar says December 26, 2006

As mentioned above Dataguard is oracle standby database including two services redo log transport service & redo apply apply service used to keep standby siye in synch with primary site so that in case of any disaster to primary site you can open standby site and use it as primary.

Atul

Reply
Bittoo says May 29, 2007

Hi Atul,
Can you please guide me to install dataguard on the same machine running on Windows 2000. I am getting error “ORA-01102: cannot mount database in EXCLUSIVE mode”
when i try to mount standby database.

Reply
Atul Kumar says May 29, 2007

Check Note 18676.1

Reply
hank@ahm says June 26, 2007

Atul,

is there someway to setup Primary/Physical Standby without using DG/DGB?

Thanks a lot,

hank

Reply
Atul Kumar says June 26, 2007

Nothing which I am aware of …

Reply
Anonymous says July 31, 2007

Hi Atul ,

Did you do this on Oracle apps Env. Am planing to setup DR plan using DG for Oracle apps.

Thank you
Sree

Reply
Atul Kumar says July 31, 2007

Yes, You can setup physical standby databas/dataguard with apps

Reply
Anonymous says August 3, 2007

Hi
i have a primary and standby setup for oracle 11i apps using oracle note.
i have a few concerns :
1)if i am applying 5 patches which are related to each other i feel i must copy all the applications and data ( via redo transfer ) each time after each patch is applied.looks like a tedius task.
Can you highlight the disadvantages of Dataguard with 11i for DBA ?

Reply
Atul Kumar says August 3, 2007

For patching on apps with dataguard, apply patch on primary database part will come during sync now you have to sync standyby middle tier file system (for c and g portion)

Above is for apps patch.

For Database patch apply it on both primary and standby database.

For techstack patch – (iAS and Forms) I leave it to you to decide 😉

Reply
dkimethu says October 11, 2007

Patching:
Is it a true statement to say that midtier patching needs to executed on both prod and standby since effected changes cannot get to standby?

Reply
Atul says October 11, 2007

Yes this is true that midtier patching needs to executed on both prod and standby since effected changes cannot get to standby but if this is apps patch applied using adpatch you can’t run adpatch on standby as this require database to be open on standby site.

Hence workaround is synch file syatem on middle tier or apply patch on middle tier after failover/switchover

Reply
Ashok says November 18, 2007

Hi Atul

About patching APPS with dataguard. Can we take APPS off standby (by canceling recovery on standby and making log_archive_state_2=defer in primary). Finish patching on primary. Copy middle tier files to standby site and start standby… Please suggest.

Reply
Atul says November 18, 2007

Yes this is right way to patch apps instance with DR .

If you are palnning to apply oracle database patch using opatch , apply on both primary & standby (DR) site

Reply
Ashok says November 20, 2007

Thanks Atul

Reply
rockyonramp says February 29, 2008

CAN WE CONFIGURE ORACLE ENTERPRISES MANAGER IN LOGICAL AND PHYSICAL STANDBY DATABASES ON LINUX.

Reply
Mohan says July 24, 2008

Atul : Can you please tell me , if we open the standy database in read/write mode . Any do some database changes like (DML operations ). can we regain the standby status . And also how do we take the changes made to the standy database to production database .

Reply
Add Your Reply