Check complete Status of Dataguard in Oracle

Script for Complete information about the Data Guard

From the following script you will get the complete details of dataguard including db broker parameter, sync status between two servers.

Status Script for Data guard as follows:


spool F:\dataguard.txt
set line 999 pages 999
col value for a90
col name for a50
col open_mode for a20
col database_role for a50
PROMPT ====================================
PROMPT ====================================

PROMPT Check archive mode, logging Mode, protection Mode,
PROMPT ==============================================================
col name for a10
col open_mode for a10
col databaes_role for a10
col log_mode for a15
col protection_mode for a25
select name,open_mode,database_role,log_mode,protection_mode from v$database;

PROMPT Check the value of parameters
PROMPT ==============================

col name for a26
col value for a50
select name, value
from v$parameter
where name in ('db_name', 'db_unique_name', 'log_archive_config', 'log_archive_dest_1', 'log_archive_dest_2', 'log_archive_dest_state_1', 'log_archive_dest_state_2', 'remote_login_passwordfile',
'log_archive_format', 'log_archive_max_processes', 'fal_server', 'db_file_name_convert', 'fal_client', 'log_file_name_convert', 'standby_file_management');

PROMPT Check the dbbroker service configured
PROMPT ===================================
select name,value from v$parameter where name in ('dg_broker_start','dg_broker_config_file1','dg_broker_config_file2');

PROMPT Check the archive gap
PROMPT ======================
col thread# for a20
col low_sequence# for a20
col high_sequence# for a20
select * from v$archive_gap;

PROMPT Check the standby manged process
PROMPT ================================
select process, client_process, sequence#, status from v$managed_standby;

PROMPT list the archive applied
PROMPT =========================
select sequence#, first_time, next_time, applied from v$archived_log;

PROMPT Check the archive or applied thread
PROMPT ====================================
select archived_thread#, archived_seq#, applied_thread#, applied_seq# from v$archive_dest_status;
spool off


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.