DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: How to know if a script running in SQL*Plus ...

  1. #1
    Join Date
    Feb 2001
    Posts
    100

    Question How to know if a script running in SQL*Plus ...

    Hi All,

    Is there a way to know if the script excuted in SQL*Plus fails or not without checking log files manually. In the following example if system_cr_proc.sql fails I don't want to continue.

    %binndir%sqlplus %conn% >> system_cr_proc_PL.log system_cr_proc.sql
    %binndir%sqlplus %conn% >> sec_cr_proc_PL.log secy_cr_proc.sql
    %binndir%sqlplus %conn% >> user_cr_proc_PL.log @user_cr_proc.sql


    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    "WHENEVER SQLERROR EXIT n" will give a return code n to the OS. Works OK in Windoze so it MUST work in UNIX: http://download-west.oracle.com/docs...13.htm#1014742

  3. #3
    Join Date
    Feb 2001
    Posts
    100
    Thanks DaPI

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width