×
UNIX.COM Login
Username:
Password:  
Show Password






👤


UNIX for Beginners Questions & Answers

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 Display Modes
    #1  
Old 01-02-2018
ATWC ATWC is offline
Registered User
 
Join Date: Jan 2014
Last Activity: 9 February 2018, 4:19 PM EST
Posts: 39
Thanks: 3
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old 01-02-2018
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 16 July 2018, 8:30 PM EDT
Location: NM
Posts: 11,438
Thanks: 637
Thanked 1,175 Times in 1,081 Posts


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
Sponsored Links
    #3  
Old 01-02-2018
ATWC ATWC is offline
Registered User
 
Join Date: Jan 2014
Last Activity: 9 February 2018, 4:19 PM EST
Posts: 39
Thanks: 3
Thanked 0 Times in 0 Posts
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?
Sponsored Links
👤 Login to reply

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 on multiple servers in UNIX sneha1887 Homework & Coursework Questions 2 04-26-2016 03:26 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
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 09:39 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.