E-Mail Notification Configuration

Email notification is an integral part of Dbvisit Standby. If, for any reason Dbvisit Standby has failed to transfer or apply an archive after the set threshold has been reached, an email alert will be sent. If any other error occurs, an email will also be send.

Dbvisit Standby does not yet support SSL/TLS to be able to use gmail as a SMTP server. This option is on the roadmap, but no dates are available yet.

If email is not required it can be disabled by setting:

SEND_MAIL_FLAG=N
SEND_MAIL_FLAG_DR=N

From Dbvisit Standby version 7.0.10 SSL/TLS Email (SMTP) server connectivity is supported. It is required that the MAILCFG_PROTOCOL parameter is set in the Dbvisit Standby Configuration (DDC) file with possible values SSL or TLS if this is required. Example, if gmail is used the following values must be manually specified in the primary server DDC file:


MAILCFG_SMTP_SERVER = smtp.gmail.com
MAILCFG_AUTH_USER = gmail username   (this will also become the "from" address  )
MAILCFG_AUTH_PASSWD = gmail password
MAILCFG_PORT = 465
MAILCFG_PROTOCOL = SSL

 

If you are not using SSL/TLS make sure that "MAILCFG_PROTOCOL" is not set in the DDC file and if it is set it should not have a value:

 

MAILCFG_PROTOCOL =

 

 

Daily scheduler heartbeat message

A heartbeat email will be sent each new day. This is to ensure that the emailing functionality in Dbvisit is operating normally.

The variable SEND_HEARTBEAT_TIME24 in the Dbvisit Database Configuration (DDC) file specifies what time the email will be sent. The time is in 24 hour format and should be between 0000 and 2359 hours. If this variable is not specified then an email will be sent at the beginning of each day.

Example:

    SEND_HEARTBEAT_TIME24 = 0700 

 

Multiple times can be specified separated by semicolon. To send a heartbeat message three times a day (7am, 1pm and 6 pm) specify:

SEND_HEARTBEAT_TIME24 = 0700:1300:1800 


Dbvisit will not necessary send an email at the exact time specified. Dbvisit will only send the heartbeat email when it is executed.

Example: If SEND_HEARTBEAT_TIME24=1400, but Dbvisit is not executed until 14:20, then the heartbeat email will be sent at 14:20. 

It is possible to turn the heartbeat feature off for the primary server by setting SEND_HEARTBEAT=N in the Dbvisit Database Configuration (DDC) file. To turn the heartbeat feature off for the standby server, set SEND_HEARTBEAT_DR=N.


Testing the scheduler heartbeat message

To test the scheduler heartbeat message and to send a test email, the dbv_functions utility can be used.


Use dbv_functions with the -m flag.

Example:

oracle@dbvlin101[/usr/dbvisit/standby]: ./dbv_functions -m devdb
=============================================================
Dbvisit Standby Database Technology (7.0.03.11665) (pid 18564)
dbv_functions started on dbvlin101: Mon Jan 13 20:21:17 2014 ()
=============================================================


>>> Sending heartbeat message... - done.
 

 

Include the Log Gap Report in Heartbeat message

As part of the Daily scheduler heartbeat message it is possible to include the Dbvisit Standby log gap report. 


The Dbvisit Standby log gap reports on the:

  • Archive log gap which is difference between the last archived sequence on the primary and the last applied sequence on the standby database. The archive log gap should be near 0 (except when APPLY_DELAY_LAG_MINUTES is used).
  • Transfer log gap which is the difference between the last archived sequence on the primary and the last sequence transferred to the standby server. The transfer log gap should be near 0.

 

To include the Dbvisit Standby archive and transfer log gap report in the daily heartbeat message set:

SEND_LOG_GAP_WITH_HEARTBEAT=Y



IMPORTANT

Dbvisit Standby will start the standby database if the standby database is not running and AUTO_START_STANDBY_DB = Y

 

Email Modes

There are two modes for emailing on the primary server and they are controlled with the SUCCESSMAIL parameter which can take one of two possible values, Y for yes or N for no.

SUCCESSMAIL=Y|N

 

  • SUCCESSMAIL = Y
    This will send an email every time that Dbvisit Standby transfers or applies an archive on the primary server. 
    This setting is usually set at the beginning of an installation to ensure that Dbvisit Standby is processing correctly.

  • SUCCESSMAIL = N
    This will only send an email if an error has occurred on the primary server. No email is good news. 
    However a heartbeat email will still be sent at the start of everyday to ensure that the email notification is functioning correctly.

 

There are two modes for emailing on the standby server and they are controlled with the SUCCESSMAIL_DR parameter which can take one of two possible values, Y for yes or N for no.

SUCCESSMAIL_DR=Y|N

 

  • SUCCESSMAIL_DR = Y
    This will send an email every time that Dbvisit Standby transfers or applies an archive on the primary server. 
    This setting is usually set at the beginning of an installation to ensure that Dbvisit Standby is processing correctly.

  • SUCCESSMAIL_DR = N
    This will only send an email if an error has occurred on the primary server. No email is good news. 
    However a heartbeat email will still be sent at the start of everyday to ensure that the email notification is functioning correctly.

Email Address

The email addresses are specified by the ADMINS and SUCCESS_MAILTO parameters in the DDC file. Multiple email addresses can be separated with a comma.

All email configurations are specified in the Dbvisit Standby Database Configuration (DDC) file located in DBVISIT_BASE/standby/conf directory.


If SUCCESS_MAILTO is not set, all emails notifications that Dbvisit Standby sends go to ADMINS. 
If SUCCESS_MAILTO is set to a valid email address and SUCCESSMAIL is set to Y then:

  • All error messages and warnings still always go to ADMINS:
  • Warnings sent by AMM module
  • Alert on archive log gap sequence if it exceeds the threshold (archive or transfer)
  • All error messages
  • Messages sent by running dbv_functions
  • Warning when no new logs found on the primary server to transfer to the standby
  • Warning that a previous instance of Dbvisit Standby is still running
  • Warning that a required archive log not found on standby database
  • Notifications of successful completion of CSD with a trace file attached

 - And the following messages go to SUCCESS_MAILTO:

  • Notification of successful completion of Dbvisit Standby run on the primary to transfer logs
  • Notification of successful completion of Dbvisit Standby run on the standby to apply logs
  • Heartbeat messages
  • Log gap report

If SUCCESS_MAILTO is set to a valid email address but SUCCESSMAIL is set to N then the following type of messages will not be sent at all:

  • Warning when no new logs found to transfer (even when ALERT_ON_WARNING is set)
  • Warning that a previous instance of Dbvisit Standby is still running
  • Warning that a required archive log not found on standby database
  • Notification of successful completion of Dbvisit Standby run on the primary to transfer logs
  • Notification of successful completion of Dbvisit Standby run on the standby to apply logs

Â