ホームページ >データベース >mysql チュートリアル >Oracle 11g Data Guard: How to start and stop Redo Apply
1 Starting Redo Apply To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement. You
1 Starting Redo Apply
To start apply services on a physical standby database, ensure thephysical standby database is started and mounted and then start Redo Applyusing the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.
You can specify that Redo Apply runs as a foreground session or as abackground process, and enable it with real-time apply.
alterdatabase recover managed standby database disconnect from session;
alterdatabase recover managed standby database using current logfile disconnect fromsession;
2 Stopping Redo Apply
To stop Redo Apply, issue the following SQL statement:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
3 Advanced Configuration
3.1 Using Real-Time Apply to ApplyRedo Data Immediately
If the real-time apply feature is enabled, apply services can applyredo data as it is received, without waiting for the current standby redo logfile to be archived. This results in faster switchover and failover timesbecause the standby redo log files have been applied already to the standbydatabase by the time the failover or switchover begins.
Use the ALTER DATABASE statement to enable the real-time applyfeature, as follows:
Real-time apply requires a standbydatabase that is configured with a standby redo log and that is in ARCHIVELOGmode.
The figure belowshowsa Data Guard configuration with a local destination and a standby destination.As the remote file server (RFS) process writes the redo data to standby redolog files on the standby database, apply services can recover redo from standbyredo log files as they are being filled.
3.2 Specifying a Time Delay for theApplication of Archived Redo Log Files
In some cases, you may want to create a time lag between the timewhen redo data is received from the primary site and when it is applied to thestandby database. You can specify a time interval (in minutes) to protectagainst the application of corrupted or erroneous data to the standby database.When you set a DELAY interval, it does not delay the transport of the redo datato the standby database. Instead, the time lag you specify begins when the redodata is completely archived at the standby destination.
Note:
If you define a delay for a destination that has real-time applyenabled, the delay is ignored.
Specifying a Time Delay
You can set a time delay on primary and standby databases using theDELAY=minutes attribute of theLOG_ARCHIVE_DEST_n initializationparameter to delay applying archived redo log files to the standby database. Bydefault, there is no time delay. If you specify the DELAY attribute withoutspecifying a value, then the default delay interval is 30 minutes.
Canceling a Time Delay
You can cancel a specified delay interval as follows:
These commands result in apply services immediately beginning toapply archived redo log files to the standby database, before the time intervalexpires.
Using Flashback Database as anAlternative to Setting a Time Delay
As an alternative to setting an apply delay, you can use FlashbackDatabase to recover from the application of corrupted or erroneous data to thestandby database. Flashback Database can quickly and easily flash back astandby database to an arbitrary point in time.
作者:xiangsir
QQ:444367417
MSN:xiangsir@hotmail.com