Schedule cron for Cluster Health Check on Oracle 19c.



#!/bin/bash


export BASE_DIR=$ORACLE_HOME/cv

export dt=`printf '%(%m%d%Y)T\n' -1`


cluvfy comp healthcheck -html -save -savedir $BASE_DIR


export report=`ls cvucheckreport_$dt*.html`


ARG_EMAIL_TO="user1@user1.com, user@user2.com"

ARG_EMAIL_FROM="yourmail@domain.com"

ARG_EMAIL_SUBJECT="DBName - Cluster HealthCheck Report"


(

  echo "To: ${ARG_EMAIL_TO}"

  echo "From: ${ARG_EMAIL_FROM}"

  echo "Subject: ${ARG_EMAIL_SUBJECT}"

  echo "Mime-Version: 1.0"

  echo "Content-Type: text/html; charset='utf-8'"

  echo

  cat $report

) | sendmail -t

Comments

Popular posts from this blog

Agent Installation on Windows Server. SQL Server (Failover Cluster) target addition in OEM 12c

Oracle 10g/11g Linux:SMS the alert logs ORA- errors generated in timestamp

Oracle 11g: Install Instant Client 11.2.0.3.0 on Linux x86_64 Server.