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: Powell, Mark D <mark.powell_at_eds.com>
Date: Wed, 26 May 2004 09:31:54 -0400
Message-ID: <564DE4477544D411AD2C00508BDF0B6A1CE0AB57@usahm018.exmi01.exch.eds.com>


Here is an idea. Add a write to a dbms_pipe to each script that sends the task return code to the pipe reader. Now add one more script that opens the pipe for read and goes into a loop: read, sleep until all tasks have registered. When all tasks have registered thier ending status then this monitoring task exists success otherwise it fires off an error message and exists failure.

Also shouldn't you be appending the log messages (>>) rather than creating the log file,(>).

HTH -- Mark D Powell --

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Ryan Sent: Tuesday, May 25, 2004 10:35 PM
To: oracle-l_at_freelists.org
Subject: OT: Unix Question

Its related to Oracle. I need to parallelize some SQL. I need to use korn shell to do it. My problem, is how do I run multiple processes in the background and return the exit status from each one? So I can know when to check for errors.
One way is to write the exit statuses to a file. I would prefer not to do that. This is what I have right here.

nohup run_sql $ERROR_MSG_OPTION -u $LOGIN_FILE_NAME $SQL_SCRIPT1 2>&1 > sql_script1.log; message "$? $SQL_SCRIPT1" $STATUS_FILE & nohup run_sql $ERROR_MSG_OPTION -u $LOGIN_FILE_NAME $SQL_SCRIPT2 2>&1 > sql_script1.log;
message "$? SQL_SCRIPT2" $STATUS_FILE &
wait



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

-----------------------------------------------------------------
----------------------------------------------------------------
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 - 08:29:28 CDT

Original text of this message

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