Tuesday, November 21, 2017

Oracle Database Health Check Report In HTML Format

Update: This post is considered obsolete, the main script can now send the report in either HTML/TEXT format, please refer to the original post:

If you don't have "sendmail" package installed on your Linux OS then this post will help you out.

I've got numerous requests asking to make the original health check report script to send its report in HTML format. In this post, I'll explain how to do so.

1- Download sendEmail executables which will allow the script to send the report as an attachment:

2- Extract sendEmail package files under the home directory of the Oracle software Owner e.g. /home/oracle:
# cd /home/oracle
# tar xvf sendEmail-v1.56.tar

3- Download the HTML version of Oracle Health Check Report script:

Open the script with "vi" editor and replace "youremail@yourcompany.com" with your right email address at line# 90:

Please note that due to the limitation of the HTML options in OS commands, I've excluded some checks from being reported by this script [HTML version], like: Local File system & Cluster ware Service.

In case you don't like the HTML version and want to use the text based version [I encourage you to do so :-)] please visit the original post and download the text-based output version of this script:

Wednesday, November 1, 2017

Shell Script To Monitor/Check The Lag/Sync Status Between Primary And Standby Oracle Database

Script Description:
This Linux shell script runs from the PRIMARY DB server to monitor and checks the lag/synchronization status between Primary and Standby Oracle DBs and reports the lag [if happened] to the user.

Download the script:

How to use the script:
Unfortunately, this script will not work unless you manually modify the variables' values in brown color to match your environment: [Those variables are at the begging of the script]

# Here you replace youremail@yourcompany.com with your Email address:

# Replace ${ORACLE_SID} with the Primary DB instance SID:

# Replace STANDBY_TNS_ENTRY with the Standby Instance TNS entry you configured in the primary site tnsnames.ora file: e.g. orcl_standby

# Replace ${ORACLE_HOME} with the ORACLE_HOME path on the primary server:

# Log Directory Location:
export LOG_DIR

# Here you replace SYSPASS with user SYS password on the standby DB: [The worst part I know :-)]
export CRD

# Replace "5" with the number of LAGGED ARCHIVELOGS if reached an Email alert will be sent to the receiver:

You can schedule this script in the crontab to run e.g. every 15 minutes to get you alerted if the number of lagged archive logs cross the predefined threshold.

Reminder: This script runs from the primary DB server NOT from the standby server.
Hope you will find it useful.

This script is part of DBA Bundle scripts: http://dba-tips.blogspot.ae/2014/02/oracle-database-administration-scripts.html