0% found this document useful (0 votes)
116 views3 pages

Using Real-Time Apply To Apply Redo Data Immediately

The document discusses enabling and using real-time apply on Oracle databases to apply redo data as it is received without waiting for archived redo log files. It describes using the ALTER DATABASE statement to enable real-time apply on physical and logical standby databases for faster switchover and failover times. The document also provides examples of starting redo apply on a physical standby database in the foreground or background, with or without real-time apply enabled.

Uploaded by

Mahi Pal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views3 pages

Using Real-Time Apply To Apply Redo Data Immediately

The document discusses enabling and using real-time apply on Oracle databases to apply redo data as it is received without waiting for archived redo log files. It describes using the ALTER DATABASE statement to enable real-time apply on physical and logical standby databases for faster switchover and failover times. The document also provides examples of starting redo apply on a physical standby database in the foreground or background, with or without real-time apply enabled.

Uploaded by

Mahi Pal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

http://docs.oracle.com/cd/B19306_01/server.102/b14239/log_apply.

htm#i1022811

6.2.1 Using Real-Time Apply to Apply Redo Data Immediately


If the real-time apply feature is enabled, log apply services can apply redo data as it is received, without waiting for the current standby
redo log file to be archived. This results in faster switchover and failover times because the standby redo log files have been applied
already to the standby database by the time the failover or switchover begins.
Use the ALTER DATABASE statement to enable the real-time apply feature, as follows:
 For physical standby databases, issue the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING
CURRENT LOGFILE statement.
 For logical standby databases, issue the ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE statement.

Description of "Figure 6-1 Applying Redo Data to a Standby Destination Using Real-Time Apply"

6.3.1 Starting Redo Apply


To start log apply services on a physical standby database, ensure the physical standby database is started and mounted and then start
Redo Apply using the SQL ALTER DATABASE RECOVER MANAGED STANDBY DATABASE statement.
You can specify that Redo Apply runs as a foreground session or as a background process, and enable it with real-time apply.
 To start Redo Apply in the foreground, issue the following SQL statement:

 SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;

If you start a foreground session, control is not returned to the command prompt until recovery is canceled by another session.
 To start Redo Apply in the background, include the DISCONNECT keyword on the SQL statement. For example:

 SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;


This statement starts a detached server process and immediately returns control to the user. While the managed recovery process is
performing recovery in the background, the foreground process that issued the RECOVER statement can continue performing other tasks.
This does not disconnect the current SQL session.
 To start real-time apply, include the USING CURRENT LOGFILE clause on the SQL statement. For
example:
SQL> SQL> recover managed standby database using current logfile disconnect from session;
Media recovery complete.
select DEST_ID,dest_name,status,type,srl,recovery_mode from v$archive_dest_status where
dest_id=1

SQL> /

DEST_ID DEST_NAME STATUS TYPE SRL RECOVERY_MODE


---------- ------------------------------ --------- -------------- --- -----------------------
1 LOG_ARCHIVE_DEST_1 VALID LOCAL NO MANAGED REAL TIME APPLY

When Standby Database not in Real Time Recovery Mode --

SQL> recover managed standby database disconnect from session;

Media recovery complete.

SQL>

SQL> select DEST_ID,dest_name,status,type,srl,recovery_mode from v$archive_dest_status where


dest_id=1;

DEST_ID DEST_NAME STATUS TYPE SRL RECOVERY_MODE


---------- ------------------------------ --------- -------------- --- -----------------------
1 LOG_ARCHIVE_DEST_1 VALID LOCAL NO MANAGED

Protection mode can be changed from by running below command from


PRIMARY Database.

SQL> alter database set standby database to maximize availability;


Database altered.

--> It is required redo transport as SYNC

SQL> alter database set standby database to maximize protection;

Database altered.

--> It is required redo transport as SYNC

SQL> alter database set standby database to maximize performance;

Database altered.

--> It is required redo transport as async


Using DGMGRL --

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxPerformance;

Succeeded.

DGMGRL> show configuration

Configuration - ORCL_PR

Protection Mode: MaxPerformance

Databases:

ORCL - Primary database

ORCLN - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability;

Succeeded.

You might also like