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
  1. Scripts

dgobserver.ksh

In an Oracle Dataguard environment with Fast-Start Failover activated, you should be able to automate the restart of an “Observer”. This exactly what the script performs.

First of all you need to prepare the environment.

  • Add the ORACLE_SID into the ORATAB

  • Create under ${DMK_ORA_ADMIN_SID} a “etc” directory

  • Source DMK to load the new configuration

  • Copy into “${DMK_ORA_ADMIN_SID}/etc” the dgobserver.cfg template

cat ${DMK_HOME}/templates/etc/dgobserver.cfg
# template dgcheck.cfg  - defines variables for  the observer monitoring script

#****************************************************************************************
# Connection string to the ConfigurationWideServiceName
# create an entry in tnsnames.ora with
# <DB_NAME>_CFG.<DB_DOMAIN>=
#  (DESCRIPTION =(ADDRESS=(PROTOCOL=TCP)(HOST=<host1>)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=<host2>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<db_name>_CFG.<DB_DOMAIN>)))

ConnectStringConfigWide="/@<DB_UNIQUE_NAME>.<DB_DOMAIN>"

# To use 'in background' start-option, a wallet-connect (/@alias) is required

#****************************************************************************************
# Connection string to the primary - only to specify if not using ConnectStringConfigWide
#ConnectStringPrim="sys/xxxx@<DB_UNIQUE_NAME>.<DB_DOMAIN>"

#****************************************************************************************
# Connection string to the Standby - only to specify if not using ConnectStringConfigWide
#ConnectStringStdb="sys/xxxx@<DB_UNIQUE_NAME>.<DB_DOMAIN>"

#****************************************************************************************
# Kill the Observer process once timeout has been reached (seconds)
ObserverStopHardlyTimeOut=30

#****************************************************************************************
# This parameter specify how long the script retries to reach
# the databases in order to start the observer (seconds)
ObserverRebootRetryTime=600

It is recommended to connect to the configuration wide service name

DGMGRL> show configuration ConfigurationWideServiceName

This service is registered by all running database sites with the local listener. It is recommended to create a tnsnames alias <DB_UNIQUE_NAME>.<DB_DOMAIN> using this service (per default <db_name>_CFG.<db_domain>).

As highlighted by the above configuration the script tries to reach at least one database instance (regardless of the database role) in order to start/stop the observer and enter in a loop which retries to connect to the database for about 10minutes.

This is especially useful in case of a reboot; mostly the database servers needs more time to complete the boot sequence. Therefore the script loops for 10min before it gives-up.

Syntax

dgobserver.ksh [start|stop|status] [SID]

Do not forget to add the script into the “${DMK_HOME}/etc/service_start_stop.cfg” configuration file in order to start/ the observer in case of a reboot.

Previousgoldengate.kshNextversion.ksh|version

Last updated 5 months ago

📃