Unix/Linux Go Back    


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

UNIX for Beginners Questions & Answers


Tags
solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 2 Weeks Ago   -   Original Discussion by ATWC
ATWC's Unix or Linux Image
ATWC ATWC is offline
Registered User
 
Join Date: Jan 2014
Last Activity: 11 January 2018, 9:49 AM EST
Posts: 36
Thanks: 2
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; 2 Weeks Ago at 09:31 AM.. Reason: Added CODE tags
Sponsored Links
    #2  
Old Unix and Linux 2 Weeks Ago   -   Original Discussion by ATWC
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 15 January 2018, 9:34 AM EST
Location: NM
Posts: 11,284
Thanks: 581
Thanked 1,127 Times in 1,038 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 Unix and Linux 2 Weeks Ago   -   Original Discussion by ATWC
ATWC's Unix or Linux Image
ATWC ATWC is offline
Registered User
 
Join Date: Jan 2014
Last Activity: 11 January 2018, 9:49 AM EST
Posts: 36
Thanks: 2
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
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 04:26 AM
run oracle procedure in unix scripts utoptas Shell Programming and Scripting 0 07-26-2010 07:38 AM
how to call oracle stored procedure from unix shell barani75 Shell Programming and Scripting 6 02-26-2010 03:51 PM
Passing parameters form unix to Oracle procedure rajasekharamy Shell Programming and Scripting 0 04-12-2007 09:24 AM
calling Oracle procedure from Unix ssmiths001 UNIX for Dummies Questions & Answers 1 01-19-2005 10:40 AM



All times are GMT -4. The time now is 05:13 PM.