Data Guard monitoring
This chapter presents the two main frameworks of this package.
dgcheck.ksh
This is an intelligent Oracle Data Guard monitoring script. Even if the Data Guard broker configuration is successful it warns in case the database Flash Recovery Area becomes busy, or if you forgot that restart the archive log shipping, apply process after an application upgrade and so on …
ℹ️ “dgcheck.ksh” supports several standby databases
The execution of dgcheck.ksh requires a configuration file, which contains the following parameters.
The script requires command lines argument in addition to the configuration file. Some of the configuration file parameters are also available in command-line.
The parameters given in command line are from higher priority compared to their configuration values.
Example:
The default configuration parameter NoSuccessMail is set to 0. Which means each time the dgcheck.ksh script starts it sends the report mail even if the status is successful.
To receive the report only on case of errors launch the script as follows
Requirements
On the dgecheck host, the Oracle*Net tnsnames.ora file shall contain the following entries:
Primary database connection string
Standby database connection string
Application connection string
Starting with Oracle 11g it’s no more required to add the primary and standby database connection string to the host’s tnsnames.ora as dgcheck extracts and uses the connection string from Data Guard Broker database parameter “StaticConnectIdentifier”. This parameter replaces the Oracle 10g Data Guard Broker parameter “InitialConnectIdentifier” which refers only the tnsnames alias.
parameters
A hyphen character prefixes the command line parameters as they are be used within a shell.
–h or –help
Display the Synopsis.
–f or –-ConfigFile
ℹ️The dbi services best practice consist of saving the configuration file under the database admin directory which makes the command-line parameter “ConfigFile” useless
Otherwise the command-line parameter becomes mandatory
–s or --sid
–c or –-ConnectString
–n or –-NoSucessMail
–ignore-flashback
Ignore warnings about the database flashback feature for the report and the mail. This command line argument is valid for the primary database and the standby database.
⚠️dbi services recommend to enable the database flashback feature on the primary and standby database. (V$DATABASE.FLASHBACK_ON = ON)
–ignore-force-logging
Ignore warnings about the database force logging mode for the report and the mail. This command line argument is valid for the primary database and the standby database.
⚠️dbi services strongly recommend to enable the database force logging. (V$DATABASE.FORCE_LOGGING = YES)
MailRecipients
Customer
SmtpServer
MailFrom
Data Guard automatic Failover/Switchover alerting
You might already wonder why Oracle does not provide a feature to monitor and inform you that an automatic failover occurred. To fill this gap dbi services developed a PL/SQL framework which sends a mail each time the database role change.
Prior to the installation you should know:
The ip or name of your SMTP server
The list of mail recipients
The sender mail address (depending on the Enterprise Mailing Policies)
Please read the README for details about the installation process and the required database privileges.
Last updated