Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 831 of 2,288    |
|    Ubiquitous to vishal    |
|    Re: How to know in a unix script if orac    |
|    19 Dec 03 13:07:58    |
   
   XPost: comp.databases.oracle.misc   
   From: weberm@polaris.net   
      
   vishal wrote:   
      
   : I am writing my first script to execute a Oracle procedure through a   
   : unix script. Could you tell me how do I do error handling here? How do   
   : I know in my script if the procedure executed successfully or failed?   
   : Thanks   
      
   What I do is run the script with the output piped to a log file and within   
   the script itself, test for errors...   
   Within the stored procedure itself, there's a bunch of EXCEPTION handling   
   clauses with more specific error messages.   
      
   $HOME/bin/qs "execute load_table('X')"   
   echo "load_table has executed"   
      
   if [ $? -ne 0 ]   
   then   
   echo "An error has occurred"   
   exit   
   fi   
      
   err=`grep 'ORA-' $HOME/logfile|wc -1   
   if [ $err -ne 0 ]   
   then   
   echo "An ORACLE error has occurred"   
   exit   
   fi   
      
   Hope this helps!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca