Pages

Showing posts with label alter database recover managed standby. Show all posts
Showing posts with label alter database recover managed standby. Show all posts

Tuesday, March 5, 2013

How to check RECOVER MANAGED STANDBY DATABASE real time apply?



### On Standby: Delayed apply or Real time apply?


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 60 disconnect; -- apply delayed for 60 minutes.

Database altered.

SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

RECOVERY_MODE
-----------------------
MANAGED
IDLE
IDLE
IDLE
...


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect; -- Realtime apply

Database altered.

SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS; 

RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
IDLE
IDLE
IDLE
...



-- no time delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; 

-- no time delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY DISCONNECT;

-- 60 minutes delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 60 DISCONNECT;

-- real time apply
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;


--- Note: -----------------------------------------------------------------------------------

By default, apply services wait for the full archived redo log file to arrive on the standby database before applying it to the standby database.

If the real-time apply feature is enabled, apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived.