Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Unix Question

Re: Unix Question

From: Shawn Ferris <shawn_at_virtualsmf.net>
Date: Wed, 26 May 2004 15:25:07 -0600 (MDT)
Message-ID: <2535.168.215.22.23.1085606707.squirrel@mail.virtualsmf.net>


And BTW.. The solution I think you're looking for is:

#!/bin/ksh
(

  exec >> sql_script1.log 2>&1
  run_sql $ERROR_MSG_OPTION -u $LOGIN_FILE_NAME $SQL_SCRIPT1   message "$? $SQL_SCRIPT1" $STATUS_FILE ) &

(

  exec >> sql_script2.log 2>&1
  run_sql $ERROR_MSG_OPTION -u $LOGIN_FILE_NAME $SQL_SCRIPT2   message "$? SQL_SCRIPT2" $STATUS_FILE
) &

wait

If you enclose commands within parens, it forks them in a new shell. The exec replaces your redirections so that ALL messages/ errors within the forked process get logged.. even if the message command itself generates output/ errors.

Be sure to nohup this script.. that should cascade to the child processes.
(NOTE: the nohup removal from the run_sql commands themselves)

HTH Shawn



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed May 26 2004 - 16:12:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US