Wednesday, 18 September 2013

Monitoring Commands for Data Guard

Following commands will be helpful for monitoring Data Guard environment.

---From Primary:

select protection_mode,protection_level,database_role,switchover_status
from v$database;

select to_char(timestamp,'YYYY-MON-DD HH24:MI:SS')||'   '||message
from v$dataguard_status;

SELECT max(sequence#) AS "PRIMARY" FROM v$log_history;


---From standby database:

select protection_mode,protection_level,database_role,switchover_status
from v$database;

select to_char(timestamp,'YYYY-MON-DD HH24:MI:SS')||'   '||message from v$dataguard_status;

select process,status,thread#,sequence#,block#,blocks
from v$managed_standby;

SELECT max(sequence#) AS "STANDBY", applied
FROM v$archived_log GROUP BY applied;

SELECT THREAD#, SEQUENCE#, APPLIED
FROM V$ARCHIVED_LOG;

SELECT THREAD#, SEQUENCE#, APPLIED,to_char(FIRST_TIME,'YYYY-MON-DD HH24:MI:SS') FIRST_TIME
FROM V$ARCHIVED_LOG
where APPLIED!='YES';

SELECT thread#, low_sequence#, high_sequence# from V$archive_gap;

No comments:

Post a Comment