Posts

Showing posts from 2022
Image
  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