Q

Moving archive log files from primary to standby database

I have the following scenario with an Oracle 10g Data Guard database. All the archive log files from the primary database are moved to standby. One of my tasks is to make sure that the moved log files will not get applied immediately to the standby database. My question is in what mode should I keep the standby database for the above to work? Also, I need to write a shell script to apply the archive log files to the standby database

I have the following scenario with an Oracle 10g Data Guard database. All the archive log files from the primary database are moved to standby. One of my tasks is to make sure that the moved log files will not get applied immediately to the standby database. My question is in what mode should I keep the standby database for the above to work? Also, I need to write a shell script to apply the archive log files to the standby database by running the script at specific intervals. I am wondering if you have a script/advice to do this.

You mention that you do not want the redo applied to the standby database immediately. This means that you want to have "data divergence," meaning the data in both the primary and the standby are not in sync. The next question you need to answer is if you are allowed to have data loss. Is it imperitive that the standby database receive every transaction on the primary? If you require zero data loss but can have data divergence, then...

you will be running your Data Guard configuration in "instant protection mode." If you do not require zero data loss and can have data divergence, then you will be running your Data Guard configuration in "rapid protection mode." Instant protection mode can have poorer performance than rapid protection mode, but that is the price to be paid for zero data loss.

You do not need any shell scripts to apply the redo at the standby site. Configure Oracle correctly and let Oracle handle this for you. In your primary, you'll want to set you init parms similar to the following:

LOG_ARCHIVE_DEST_2 = 'SERVICE=standby LGWR SYNC AFFIRM DELAY=20';
The above parameter says that the transmission is synchronous (SYNC) and that the standby site must send confirmation of receipt (AFFIRM) for zero data loss. The DELAY component indicates that there will be a delay of 20 minutes before the redo is applied to the standby database. Since the above is for zero data loss, this is for the instant protection mode. For rapid protection mode, simply change SYNC to ASYNC and AFFIRM to NOAFFIRM.

All of this is fully documented in the Data Guard documentation.

This was first published in December 2005

Dig deeper on Oracle database backup and recovery

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close