SELECT PROCESS, STATUS,SEQUENCE#,BLOCK#,BLOCKS, DELAY_MINS FROM V$MANAGED_STANDBY;
#Determining Which Log Files Were Applied to the Standby Database
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
#Determining the Progress of Redo Apply
SELECT ARCHIVED_THREAD#, ARCHIVED_SEQ#, APPLIED_THREAD#, APPLIED_SEQ# FROM V$ARCHIVE_DEST_STATUS;
# How to check Log Shipping ?
select sequence#,first_time,next_time
from v$archived_log
order by sequence
#Determining Which Log Files Were Applied to the Standby Database
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
#Bringing up Standby DB
1.)shutdown immediate;
2.)startup nomount
3.)alter database mount standby database;
4.)alter database recover managed standby database disconnect from session
SQL> desc v$archive_gap
Name Null? Type
----------------------------------------- -------- ----------------------------
THREAD# NUMBER
LOW_SEQUENCE# NUMBER
HIGH_SEQUENCE# NUMBER
For example, execute one of the following statements:
RECOVER STANDBY DATABASE # uses location for logs specified in
# initialization parameter file
RECOVER FROM '/logs' STANDBY DATABASE # specifies nondefault location
set lines 132 pages 2000
-- Check to be sure the status of the DB is MOUNTED.
select OPEN_MODE, DATABASE_ROLE from v$database;
-- Determine if any error conditions have been reached by querying the v$dataguard_status
-- view (view only available in 9.2.0 and above):
column message format a80
select message, timestamp
from v$dataguard_status
where severity in ('Error','Fatal')
order by timestamp;
-- Verify that the last sequence# received and the last sequence# applied to standby
-- database.
col "Last Seq Recieved" for 99999999999
col "Last Seq Applied" for 99999999999
select max(al.sequence#) "Last Seq Recieved",thread# from v$archived_log al
group by thread#;
select max(lh.sequence#) "Last Seq Applied",thread# from v$log_history lh
group by thread#;
-- The V$ARCHIVE_GAP fixed view on a physical standby database only returns the next
-- gap that is currently blocking redo apply from continuing. After resolving the
-- identified gap and starting redo apply, query the V$ARCHIVE_GAP fixed view again
-- on the physical standby database to determine the next gap sequence, if there is
-- one.
select * from v$archive_gap;
#Determining Which Log Files Were Applied to the Standby Database
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
#Determining the Progress of Redo Apply
SELECT ARCHIVED_THREAD#, ARCHIVED_SEQ#, APPLIED_THREAD#, APPLIED_SEQ# FROM V$ARCHIVE_DEST_STATUS;
# How to check Log Shipping ?
select sequence#,first_time,next_time
from v$archived_log
order by sequence
#Determining Which Log Files Were Applied to the Standby Database
SELECT THREAD#, MAX(SEQUENCE#) AS "LAST_APPLIED_LOG" FROM V$LOG_HISTORY GROUP BY THREAD#;
#Bringing up Standby DB
1.)shutdown immediate;
2.)startup nomount
3.)alter database mount standby database;
4.)alter database recover managed standby database disconnect from session
SQL> desc v$archive_gap
Name Null? Type
----------------------------------------- -------- ----------------------------
THREAD# NUMBER
LOW_SEQUENCE# NUMBER
HIGH_SEQUENCE# NUMBER
For example, execute one of the following statements:
RECOVER STANDBY DATABASE # uses location for logs specified in
# initialization parameter file
RECOVER FROM '/logs' STANDBY DATABASE # specifies nondefault location
set lines 132 pages 2000
-- Check to be sure the status of the DB is MOUNTED.
select OPEN_MODE, DATABASE_ROLE from v$database;
-- Determine if any error conditions have been reached by querying the v$dataguard_status
-- view (view only available in 9.2.0 and above):
column message format a80
select message, timestamp
from v$dataguard_status
where severity in ('Error','Fatal')
order by timestamp;
-- Verify that the last sequence# received and the last sequence# applied to standby
-- database.
col "Last Seq Recieved" for 99999999999
col "Last Seq Applied" for 99999999999
select max(al.sequence#) "Last Seq Recieved",thread# from v$archived_log al
group by thread#;
select max(lh.sequence#) "Last Seq Applied",thread# from v$log_history lh
group by thread#;
-- The V$ARCHIVE_GAP fixed view on a physical standby database only returns the next
-- gap that is currently blocking redo apply from continuing. After resolving the
-- identified gap and starting redo apply, query the V$ARCHIVE_GAP fixed view again
-- on the physical standby database to determine the next gap sequence, if there is
-- one.
select * from v$archive_gap;