Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. #############################################################
  2. # DataBase Parametrs
  3. #############################################################
  4. HostString='HOST'
  5. UserID='USER'
  6. Password='PASS'
  7. TableName2=TABLE2
  8. TableName1=TABLE1
  9. procedureName=PROCEDURENAME
  10.  
  11. CheckCode=`sqlplus -s  $UserID/${Password}@$HostString << EOF
  12.        exec $procedureName;
  13.        exit;
  14. EOF
  15.  
  16. ## IF the SQLPLUS command above fails, send this email (HELP!)
  17. SUBJECT="test completed successfully"
  18. EMAIL="user@host.com"
  19. EMAILMESSAGE="/tmp/emailmessage.txt"
  20. echo "This is an email message test"> $EMAILMESSAGE
  21. echo "This is email text" >>$EMAILMESSAGE
  22. # send an email using /bin/mail
  23. /bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement