We're here to help!

E-Mail Alert for Archive log gap

Follow

 

Topic

 E-Mail Alert for Archive log gap

Applicable Error Code

 N/A

Versions Affected

 7.0.X and 8.0.X

Platforms Affected

 All Platforms

Source/Target (If Replication)

 N/A

Problem Statement

 To configure email alerts only when the standby database is number of archives behind

Fix

 Generic Article

Warning

 Backup of DDC file before performing the task

Article:

    1. Edit the DDC file dbv_SID.env

    2. Add the below entries in the DDC file in the “Mail setting” and “Advanced Mail setting” , if a particular parameter is not found you can add them in these portion of the DDC file(The values provided below are just an example).


SEND_MAIL_FLAG = Y
SEND_MAIL_FLAG_DR = Y
MAILCFG_AUTH_USER = vijay.sivaprakasam@dbvisit.com
MAILCFG_AUTH_USER_DR =vijay.sivaprakasam@dbvisit.com
MAILCFG_AUTH_PASSWD =xxxxxxxxxxx
MAILCFG_AUTH_PASSWD_DR =xxxxxxxxx
MAILCFG_CC =
MAILCFG_BCC =
MAILCFG_ATTACH_TRACEFILE = Y
MAILCFG_ATTACH_TRACEFILE_MAX_SIZE_IN_BYTES = 768000
MAILCFG_PORT =465
MAILCFG_PORT_DR =465
MAILCFG_DEBUG =
MAILCFG_TIME_OUT =
MAILCFG_PROTOCOL =SSL
MAILCFG_FROM = oracle@dbvlab01.com
MAILCFG_FROM_DR = oracle@dbvlab03.com
MAILCFG_SMTP_SERVER = smtp.gmail.com
MAILCFG_SMTP_SERVER_DR = smtp.gmail.com 

SUCCESSMAIL = N SUCCESSMAIL_DR = N 


Below parameter has to be enabled to make sure you get email for the log gap.


EMAIL_LOG_GAP_REPORT = Y

         3. The example also shows if a particular value is not applicable to you, please leave it blank.

         4. Set the below parameters by searching the DDC file to set a threshold for archive log gap.


   ARCHIVE_LOG_GAP_THRESHOLD = 5
   TRANSFER_LOG_GAP_THRESHOLD = 5

         5. You can schedule a log gap report either in cron for unix or a scheduler in windows.


  ./dbvisit -i <DDC> - For Version 7.0
./dbvctl  -d <DDC> -i For version 8.0

        6. The test run would result in a output like below

 


oracle@dbvlab01[/usr/dbvisit/standby]: ./dbvisit -i devdb
=============================================================
Dbvisit Standby Database Technology (7.0.64.18214) (pid 9725)
dbvisit started on dbvlab01: Tue Jan 17 15:11:35 2017 ()
=============================================================

201701171511 - Alert! Archive log gap of 14 for devdb has exceeded ARCHIVE_LOG_GAP_THRESHOLD (5).
201701171511 - Alert! Transfer log gap of 14 for devdb has exceeded TRANSFER_LOG_GAP_THRESHOLD (5).
Dbvisit Standby log gap report for devdb at 201701171511:
-------------------------------------------------------------
Standby database on dbvlab03 is at sequence: 35.
Primary database on dbvlab01 is at log sequence: 50.
Primary database on dbvlab01 is at archived log sequence: 49.
Dbvisit Standby last transfer log sequence: 35.
Dbvisit Standby last transfer at: 201701171509.

Archive log gap for devdb:  14.
Transfer log gap for devdb: 14.
Standby database time lag (HH:MI:SS): 00:02:07.
Have more questions? Submit a request

Comments