Monitoring Oracle Data Guard

Oracle Data Guard concept make sure high availability, disaster recovery and data protection of your enterprise database. In Case of disaster or data correction your database can easily run on data guard.

Data Guard can be of two types:

Physical Stand By Database:
Physical Stand by Database provides physical identical copy of your database. It has similar schema and schema. Physical Stand by synchronized by applying redo logs from primary database.

Logical Stand by Database:
Logical Stand by database provides logical information of the data files. It can be of different structure and physical org. Logical Stand by synchronizes by using sql statement and then execute sql statement in logical database.

Devamını oku: Monitoring Oracle Data Guard
  • Basic information of database (primary or standby)

SQL> SELECT DATABASE_ROLE, DB_UNIQUE_NAME INSTANCE, OPEN_MODE, PROTECTION_MODE, PROTECTION_LEVEL, SWITCHOVER_STATUS FROM V$DATABASE;

  • To can check for messages/errors

SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS;

  • To display current status information

SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY ;

  • Show received archived logs list

SQL> select registrar, creator, thread#, sequence#, first_change#, next_change# from v$archived_log;

  • Check apply rate

SQL> select to_char(start_time, ‘DD-MON-RR HH24:MI:SS’) start_time,item, round(sofar/1024,2) “MB/Sec” from v$recovery_progress
where (item=‘Active Apply Rate’ or item=‘Average Apply Rate’);

-To find last applied log

SQL> select to_char(max(FIRST_TIME),‘hh24:mi:ss dd/mm/yyyy’) FROM V$ARCHIVED_LOG where applied=‘YES’;

  • Check latest last sequence# received and the last sequence# applied to standby database.

SQL> SELECT al.thrd “Thread”, almax “Last Seq Received”, lhmax “Last Seq Applied” FROM (select thread# thrd, MAX(sequence#) almax FROM v$archived_log WHERE resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) al, (SELECT thread# thrd, MAX(sequence#) lhmax FROM v$log_history WHERE resetlogs_change#=(SELECT resetlogs_change# FROM v$database) GROUP BY thread#) lh WHERE al.thrd = lh.thrd;



Yorum bırakın