Check Oracle dataguard is in sync status

How to check oracle dataguard is in sync status

Primary Server:

Select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
------ ---------- --------------------
ORCL READ WRITE PRIMARY
select status,gap_Status from v$archive_Dest_Status where dest_id=2;
STATUS GAP_STATUS
--------- ------------------------
ERROR RESOLVABLE GAP
select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
193254

Standby Server:

Select name,open_mode,database_role from v$database;
NAME DATABASE_ROLE
------ --------------------
ORCLDR PHYSICAL STANDBY
select max(sequence#) from v$archived_log where applied='YES';
MAX(SEQUENCE#)
--------------
193130

Start the recovery process for archive applied on standby

Connect standby server
conn sys as sysdba
startup mount;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
OR
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

Verify the archive log status applied or any gap with above commands:

Select status,gap_status from v$archive_dest_status where dest_id=2;
STATUS GAP_STATUS
--------- ----------------------
VALID NO_GAP

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply