Tablespace Usage

# That script will check free space on all Oracle databases and send email
# Click on tbsp_size to see tbsp_size.sql script
#
. /home/oracle/ora.env
cd /app/scripts

check_one()
{
export ORACLE_SID=$1
sqlplus /nolog EOF
connect / as sysdba
@tbsp_size
exit
EOF
}

check_one your_oracle_sid
check_one one_more_oracle_sid

for i in `ls tbsp_size_*txt`
do
  cat $i >> tbsp_size.txt
done
rm -f tbsp_size_*txt

MAIL_SUBJECT="Oracle database status report"
EMAIL_LIST="[email protected]"
cat tbsp_size.txt | mail -s "$MAIL_SUBJECT" -e "$EMAIL_LIST"
Hosted by www.Geocities.ws

1