#Shell Script to check invalid Views on IBM Netezza System
#Manish Jaiswal
#!/bin/sh
cd /export/home/nz
. ~/.bashrc
export PATH=/nz/kit/bin:/nz/kit/sbin:/nz/kit/bin/adm:/bin:/usr/bin:/usr/local/bin:.:/nz/support/bin
DBA_email="EDW_Support@gmail.com"
DATE=`date +%Y-%m-%d:%H:%M:%S`
LOG=/export/home/nz/scripts/log/check_invalid_views_lp_$DATE.log
echo "Starting view check on `hostname` " > $LOG
for i in `cat /export/home/nz/scripts/PRD_LP_DB_List.lst`
do
echo "Starting view check of Database $i " >> $LOG
nz_check_views $i >> $LOG
done
echo " Find the NZ View check Report for `hostname` server in attachment"| mailx -s "`hostname` NZ View check Report for Netezza on `date +%y%m%d%H%M%S` " -a $LOG "$DBA_email"
#Manish Jaiswal
#!/bin/sh
cd /export/home/nz
. ~/.bashrc
export PATH=/nz/kit/bin:/nz/kit/sbin:/nz/kit/bin/adm:/bin:/usr/bin:/usr/local/bin:.:/nz/support/bin
DBA_email="EDW_Support@gmail.com"
DATE=`date +%Y-%m-%d:%H:%M:%S`
LOG=/export/home/nz/scripts/log/check_invalid_views_lp_$DATE.log
echo "Starting view check on `hostname` " > $LOG
for i in `cat /export/home/nz/scripts/PRD_LP_DB_List.lst`
do
echo "Starting view check of Database $i " >> $LOG
nz_check_views $i >> $LOG
done
echo " Find the NZ View check Report for `hostname` server in attachment"| mailx -s "`hostname` NZ View check Report for Netezza on `date +%y%m%d%H%M%S` " -a $LOG "$DBA_email"
No comments:
Post a Comment