Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################################################
- # DataBase Parametrs
- #############################################################
- HostString='HOST'
- UserID='USER'
- Password='PASS'
- TableName2=TABLE2
- TableName1=TABLE1
- procedureName=PROCEDURENAME
- CheckCode=`sqlplus -s $UserID/${Password}@$HostString << EOF
- exec $procedureName;
- exit;
- EOF
- ## IF the SQLPLUS command above fails, send this email (HELP!)
- SUBJECT="test completed successfully"
- EMAIL="user@host.com"
- EMAILMESSAGE="/tmp/emailmessage.txt"
- echo "This is an email message test"> $EMAILMESSAGE
- echo "This is email text" >>$EMAILMESSAGE
- # send an email using /bin/mail
- /bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement