DMK Oracle
release_2.2.0
release_2.2.0
  • Introduction
  • Release 2 note
  • ⚙️Installation and configuration
    • Installation & Upgrade & De-installation (Unix)
    • Installation & Upgrade & De-installation (Windows)
    • Functionalities & Features
    • Advanced Configuration
    • Variables and aliases
    • Migration to DMK
  • 🗄️Structure
    • Structure
    • Oracle Grid Infrastructure & DMK
    • Oracle Database Multitenant – DMK features
  • 📃Scripts
    • Status script
    • O.S Start/Stop script integration
      • O.S Start/Stop script integration until Red Hat/Oracle Linux 6
      • O.S Start/Stop script integration since Red Hat/Oracle Linux 7
    • dmk.sh / dmk-core.pl
    • service_start_stop.ksh
    • database.ksh
    • db_crs.ksh
    • listener.ksh
    • listener_vcs.ksh
    • fsdisc.ksh
    • emctlagent.ksh
    • emctlgrid.ksh
    • opmnctl.ksh
    • goldengate.ksh
    • dgobserver.ksh
    • version.ksh|version
    • housekeeping.{ksh|cmd }
    • odiagentctl.{ksh}
    • Libraries
      • DMK_ENV.pm
      • DMK_STATUS.pm
  • ℹ️Appendix
  • 🧩Extension
    • dmk_dbbackup
      • Introduction
      • Release notes
      • Installation
      • Functionalities & Features
      • Structure
      • dmk_rman.{ksh|cmd}
      • dmk_dtpump.{ksh|cmd}
      • dmk_backup_report.{ksh|cmd}
      • Appendix
    • dmk_dbcreate
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Database creation
      • Structure
      • Bug fix :DMK-14-10 and Oracle 12c
      • Appendix
    • dmk_dbduplicate
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Database duplicates/clones
      • Structure
      • Scheduling
      • Example
      • Appendix
    • dmk_ha
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Structure
      • Scripts
      • Data Guard : archivelog management strategy (Oracle 10g/11g)
      • Data Guard monitoring
      • DMK_HA virtual IP solution for Unix/Linux
      • DMK_HA virtual IP solution for Microsoft Windows
      • Oracle GoldenGate with Oracle Active Data Guard
      • Appendix
    • dmk_sql
      • Introduction
      • Installation & Upgrade & De-installation
      • Functionalities & Features
      • Structure
      • References
      • Scripts
      • Generate Report
      • Search
  • 📄OFA
    • Introduction
    • OFA Naming guidelines
    • OFA directory structure
Powered by GitBook
On this page
  • dgcheck.ksh
  • Requirements
  • parameters
  • Data Guard automatic Failover/Switchover alerting
  1. Extension
  2. dmk_ha

Data Guard monitoring

This chapter presents the two main frameworks of this package.

PreviousData Guard : archivelog management strategy (Oracle 10g/11g)NextDMK_HA virtual IP solution for Unix/Linux

Last updated 5 months ago

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.

dgcheck.ksh –s ${ORACLE_SID}
  • To receive the report only on case of errors launch the script as follows

dgcheck.ksh –s ${ORACLE_SID} –nosuccessmail

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

cp ${DMK_HA}/templates/dgcheck.cfg \\
	${DMK_ORA_ADMIN_SID}/etc/dgcheck.cfg

Otherwise the command-line parameter becomes mandatory

dgcheck.ksh –s ${ORACLE_SID} –c <path to the configuration file>

–s or --sid

#*************************************************************
# Commandline : --sid or -s
# You do not need to specify the ORACLE_SID of the Instance
# This SID is used in order to set the environment to the same
# Oracle binarie level, 11gR2 Data Guard - 11gR2 dgcheck Env
ORACLE_SID="<Oracle_Sid>"

–c or –-ConnectString

#*************************************************************
# Commandline : --connectstring or -c
# ConnectString [MANDATORY]
# This should be set to application TAF connect string
ConnectString="sys/<password@<ConnectString>"

–n or –-NoSucessMail

#*************************************************************
# Commandline : --nosuccessmail -n
# Default is : "0" -means the sucessmail will be sent
# "1" -mail sent by error
NoSuccessMail="0"

–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.

–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.

MailRecipients

#*************************************************************
# MailRecipients
# comma separated list of mail recipients
# Default is empty
MailRecipients=""

Customer

#*************************************************************
# Name/ShortName of the customer
# Default is : "dbi-services"
Customer=""

SmtpServer

#*************************************************************
# SmtpServer
# Infrastructure SMTP server
# Default is : "" - sendmail
SmtpServer=""

MailFrom

#*************************************************************
# MailFrom
# Hardcode address From sender
# Default is : "" - ${USERNAME}.${HOSTNAME}@${DOMAIN}
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.

more ${DMK_HA}/sql/DG_roleChange_alerting/README.txt

The dbi services best practice consist of saving the configuration file under the database admin directory which makes the command-line parameter “ConfigFile” useless

dbi services recommend to enable the database flashback feature on the primary and standby database. (V$DATABASE.FLASHBACK_ON = ON)

dbi services strongly recommend to enable the database force logging. (V$DATABASE.FORCE_LOGGING = YES)

🧩
ℹ️
ℹ️
⚠️
⚠️