XPost: comp.databases.oracle.misc   
   From: eifel-power@t-online.de   
      
   Hello,   
      
   you can use some other solution:   
      
   #!/usr/bin/ksh   
   >> sqlplus user/password@name </tmp/log/log_file_unix_shell.log   
   >> set time on   
   >> set echo on   
   >> select sysdate from dual   
   >> ;   
   >> spool procedureName.log   
   >> exec procedureName   
   >> spool off   
   >> exit   
   >> EOC   
      
   you find the output of your user(SQL)-session in the   
   /tmp/log/log_file_unix_shell.log-File.   
      
   best regards   
   thorsten häs   
      
   On Wed, 10 Dec 2003 23:49:22 +0100, Sybrand Bakker   
    wrote:   
      
   > On 10 Dec 2003 13:18:38 -0800, c_vishal@hotmail.com (vishal) wrote:   
   >   
   >> Hi,   
   >>   
   >> 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   
   >>   
   >> #!/usr/bin/ksh   
   >> sqlplus user/password@name <> set time on   
   >> set echo on   
   >> select sysdate from dual   
   >> ;   
   >> spool procedureName.log   
   >> exec procedureName   
   >> spool off   
   >> exit   
   >> EOC   
   >   
   > In the sql script include   
   > whenever sqlerror exit failure   
   > and the script will exit with a non-zero status.   
   > If this is not sufficient look up whenever sqlerror and whenever   
   > oserror on http://tahiti.oracle.com   
   >   
   >   
   > --   
   > Sybrand Bakker, Senior Oracle DBA   
      
      
      
   --   
   Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|