Home Man
Search
Today's Posts
Register

If you're not sure where to post a Unix or Linux question, post it here. All unix and Linux beginners welcome in this forum!

Parallel execution of Oracle procedure in UNIX

Tags
solved

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 01-02-2018
Parallel execution of Oracle procedure in UNIX

i have say x number of procedure to run, ie i have one procedure which accepts variable and i need that to run in parallel and capture the error code if in case if it fails through the unix.

Code:
sqlplus <EOF> exec test_t (abc,124); </EOF>
sqlplus <EOF> exec test_t (abc,125); </EOF>
sqlplus <EOF> exec test_t (abc,123); </EOF>

I want all these to run parallelly and capture the error if any1 fails. Is there any possible way to do the same in unix.


Moderator's Comments:
Parallel execution of Oracle procedure in UNIX
Please wrap all code, files, data, input & output/errors in CODE tags.
It makes it easier to read and preserves spacing for indenting or fixed-width data.

Last edited by rbatte1; 01-03-2018 at 08:31 AM.. Reason: Added CODE tags
# 2  
Old 01-02-2018
Code:
> errlog  # truncate the errlog file
for i in 124 125 126 128 129 101 203
do
(sqlplus user/passwd <<EOF >> errlog 
    exec test_t ('abc', $i);
EOF ) &
done
wait

That is just meant as a template not a well-written program.
Also be aware there are OS limits as to the number of active child processes - in this case the ( sqlplus ... ) &
Hopefully you have covered yourself with error checking in test_t, you know the WHENEVER syntax needed to exit on error and report problems
# 3  
Old 01-02-2018
if one of the calls fail, how does the error handling work? Also i have someother task which needs to be started after the above is completed. So how does WAIT condition work? bcz i need to get the status of the procedure calls once its completed. So how do i know weather all the calls have been completed.
ie say i have 4 calls and 2 of them fails, then will the error be written to the one common error file?
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Parallel execution of Oracle PROC in UNIX ATWC Shell Programming and Scripting 3 01-08-2018 11:14 AM
Parallel execution on multiple servers in UNIX sneha1887 Homework & Coursework Questions 2 04-26-2016 03:26 AM
To call Oracle procedure by reading parameter file in UNIX rohit_shinez Shell Programming and Scripting 1 01-07-2016 05:26 PM
Need to run Oracle stored procedure from UNIX env prasson_ibm Shell Programming and Scripting 4 01-04-2013 06:35 AM
run oracle procedure in unix scripts utoptas Shell Programming and Scripting 0 07-26-2010 06:38 AM
how to call oracle stored procedure from unix shell barani75 Shell Programming and Scripting 6 02-26-2010 02:51 PM
how to pass the values to unix shell from the oracle stored procedure. barani75 Shell Programming and Scripting 6 02-24-2010 10:38 AM
Invoking Oracle stored procedure in unix shell script hidnana Shell Programming and Scripting 1 10-15-2008 07:37 AM
Passing parameters form unix to Oracle procedure rajasekharamy Shell Programming and Scripting 0 04-12-2007 08:24 AM
calling Oracle procedure from Unix ssmiths001 UNIX for Dummies Questions & Answers 1 01-19-2005 09:40 AM


All times are GMT -4. The time now is 01:45 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password