Oracle Specific Email Notifications
For backwards compatibility with Dbvisit Standby versions prior to Dbvisit Standby Multiplatform, Oracle configurations allow extended email notification options on top of email settings discussed in Email and Slack Monitoring. All email types (except for Log Gap Report) described on this page will be sent from both Primary and Standby servers. This behavior is controlled by DDC parameters SEND_MAIL_FLAG
and SEND_MAIL_FLAG_DR
. By default, both are turned off. Please refer to DDC File Reference for more details on these two parameters as well as all other email parameters discussed within this page.
By default, Dbvisit tracefile is attached to all error emails. Control this by setting MAILCFG_ATTACH_TRACEFILE
and MAILCFG_ATTACH_TRACEFILE_MAX_SIZE_IN_BYTES
parameters. Use _MAILCFG_ALWAYS_ATTACH_TRACEFILE
to attach tracefile to all emails.
If any error occurs while the email is being sent, the Dbvisit processing is stopped. This can be controlled with IGNORE_MAIL_ERROR
parameter. To see SMTP debug messages in Dbvisit trace files, set MAILCFG_DEBUG = 1
. To control SMTP timeout, use MAILCFG_TIME_OUT
parameter.
The following is the complete list of DDC parameters that can be used to configure Email Notifications for Oracle configurations in Dbvisit Multiplatform. Please refer to DDC File Reference and this page for more details on each parameter listed.
Basic Mail Server Settings | |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Other Settings |
---|
|
|
|
|
|
On/Off Switches | |
---|---|
|
|
|
|
|
|
|
|
Subject Prefixes |
---|
|
|
|
|
|
Recipients |
---|
|
|
|
|
|
|
|
|
Mail Attachements |
---|
|
|
|
To understand the order of precedence between DDC email settings discussed on this page and Dbvisit MP Global Email Settings discussed in Email and Slack Monitoring, please refer to Oracle Specific Email Notifications | The Email settings order of precedence.
Message types
1. Log Gap Report
Every time log gap report is executed (either via CLI or in GUI), this email notification is sent. DDC parameter EMAIL_LOG_GAP_REPORT
needs to be set to Y
for this message to sent.
See also Log Gap Report type in Recipients and subject prefixes below.
2. Heartbeat
This email type is sent either via a schedule or via CLI command dbvctl -f send_heartbeat -d <ddc>
. Also is sent for the command dbvctl -f send_mail -d <ddc> [-a attach=<filename>]
if file not provided.
For scheduled emails, SEND_HEARTBEAT
and/or SEND_HEARTBEAT_DR
variables need to be set to Y
for the emails to be actually sent. See also SEND_HEARTBEAT_TIME24
and SEND_LOG_GAP_WITH_HEARTBEAT
parameters here DDC File Reference for more details on Heartbeat messages configuration.
See also Heartbeat type in Recipients and subject prefixes below.
Note that these heartbeat messages are distinct from Heartbeat message defined in Observer settings (see here Observer - Automatic Failover). That means that in DDC settings user can schedule one or more heartbeat messages a day from the primary server, one or more heartbeat message a day from the standby server and on top of that user can also schedule one heartbeat message to be sent from Observer.
3. AMM Alerts
On primary server, an alert email is sent if THRESHOLD_ARCHSOURCE
or FRA_THRESHOLD_ARCHSOURCE
are exceeded. On standby, an alert email is sent when THRESHOLD_ARCHDEST
is exceeded. See Archivelog Management Module for more details on how and when AMM is executed.
See also Alert type in Recipients and subject prefixes below.
4. Dbvisit Daemon Emails
Dbvisit daemon (Automated update) sends an email in case the execution was terminated due to the previous instance of the auto update execution is still running. This warning is only sent if DMN_MAX_FAIL_NOTIFICATIONS
threshold hasn’t been reached yet.
See also Info type in Recipients and subject prefixes below.
5. Send Archived Logs from Primary
If there are no new archived logs to be transferred from Primary to Standby (please also refer to LOGSWITCH
parameter in DDC File Reference), an Info email is sent. When the archived log is successfully transferred, a Success email is sent. This can be turned off by setting SUCCESSMAIL = N
in DDC file.
See also Info and Success types in Recipients and subject prefixes below.
6. Apply Archived Logs on Standby
When an archived log is successfully applied on the Standby database, a Success email notification is sent. This can be turned off by setting SUCCESSMAIL_DR = N
in DDC file.
See also Success type in Recipients and subject prefixes below.
7. CLI function send_mail
Upon its invocation, CLI function send_mail (dbvctl -f send_mail -d <ddc> [-a attach=<filename>]
) sends an Info mail containing an attachment or (if no attachment file is not provided) a Heartbeat message with no attachment.
See also Info and Heartbeat types in Recipients and subject prefixes below.
8. Execution Errors
If an error occurs during the normal Dbvisit execution, an error email is sent. By default, a tracefile is attached to this email.
See also Error type in Recipients and subject prefixes below.
Recipients and subject prefixes
For all email types except for Info email, the user can optionally define a subject prefix. This prefix will be added in front of the regular email subject, divided by a single space character. For each email type, the message is sent to a list of recipients defined by the respective parameter. If a DDC parameter for a given email type isn’t defined, then the ADMINS
parameter is used.
Type | DDC parameters | |||
---|---|---|---|---|
Mail subject prefix | Mail recipient | CC | BCC | |
Info |
| ADMINS |
MAILCFG_CC |
MAILCFG_BCC |
Alert | MAILSUBJECT_PREFIX_ALERT | ALERT_MAILTO or ADMINS | ||
Success | MAILSUBJECT_PREFIX_SUCCESSFUL | SUCCESS_MAILTO or ADMINS | ||
Error | MAILSUBJECT_PREFIX_ERROR | ERROR_MAILTO or ADMINS | ||
Heartbeat | MAILSUBJECT_PREFIX_HEARTBEAT | HEARTBEAT_MAILTO or ADMINS | ||
Log Gap Report | MAILSUBJECT_PREFIX_LOG_GAP_REPORT | LOG_GAP_REPORT_MAILTO or ADMINS |
The Email Settings Order of Precedence
The Oracle specific email notifications described on this page can be turned on by SEND_MAIL_FLAG
and SEND_MAIL_FLAG_DR
as stated above. But even with this notifications being turned on, Dbvisit MP Global Email Settings discussed in Email and Slack Monitoring are used by default. This section aims to provide an explanation of the logic behind settings usage.
Naturally we’re not mentioning the DDC parameters that turn on/off specific notification types or this functionality altogether, i.e. SEND_MAIL_FLAG
, SEND_MAIL_FLAG_DR
, EMAIL_LOG_GAP_REPORT
, SEND_HEARTBEAT
, SEND_HEARTBEAT_DR
, SUCCESSMAIL
and SUCCESSMAIL_DR
. Those are always considered during Dbvisit processing, no matter which email setting set is used.
1. Using Dbvisit MP Global Email Setting
Dbvisit MP Global Email Settings are used by default. To use DDC Email Settings, one of the recipient DDC parameters need to be set (see below for the details). When Dbvisit MP Global Email Settings are used, the following is true:
Basic SMTP Settings | |
---|---|
Used | Ignored |
SMTP Host from Global Settings |
|
SMTP Port from Global Settings |
|
Username from Global Settings |
|
Password from Global Settings |
|
Encryption Type from Global Settings |
|
Sender & Recipients | |
---|---|
Used | Ignored |
From Email from Global Settings |
|
All Email addresses defined in Control Center for the given configuration |
|
Other DDC settings | |
---|---|
Used |
|
Used |
|
Used |
|
Used |
|
2. Using DDC Email Settings
To ignore Dbvisit MP Global Email Settings completely, and only use DDC email settings, user needs to set up at least one mail recipient in DDC file. Because each message type uses different recipient parameters, user can turn on DDC email settings for each message type individually.
Message type | Turn on DDC email settings by setting up parameter |
---|---|
Info | ADMINS or MAILCFG_CC or MAILCFG_BCC |
Alert | ADMINS or MAILCFG_CC or MAILCFG_BCC or ALERT_MAILTO |
Success | ADMINS or MAILCFG_CC or MAILCFG_BCC or SUCCESS_MAILTO |
Error | ADMINS or MAILCFG_CC or MAILCFG_BCC or ERROR_MAILTO |
Heartbeat | ADMINS or MAILCFG_CC or MAILCFG_BCC or HEARTBEAT_MAILTO |
Log Gap Report | ADMINS or MAILCFG_CC or MAILCFG_BCC or LOG_GAP_REPORT_MAILTO |
When DDC email settings are on for a given message type, the following is true:
Basic SMTP Settings | |
---|---|
Used | Ignored |
| SMTP Host from Global Settings |
| SMTP Port from Global Settings |
| Username from Global Settings |
| Password from Global Settings |
| Encryption Type from Global Settings |
Sender & Recipients | |
---|---|
Used | Ignored |
| From Email from Global Settings |
| All Email addresses defined in Control Center for the given configuration |
Other DDC settings | |
---|---|
Used |
|
Used |
|
Used |
|
Used |
|