Home » SQL & PL/SQL » SQL & PL/SQL » Parallel Procedure Run (Oracle 11g, Windows 7)
Parallel Procedure Run [message #643902] Wed, 21 October 2015 02:33 Go to next message
Vijay55
Messages: 16
Registered: October 2015
Junior Member
Dear All,

Kinldy help me in one of my requirement.

I want to run 10 procedures in parallel (i.e) submission time of all ten procedures should be same. Kinldy help me which oracle functionality i should use for this.

Below is the sample procedures that i wanna run in parallel.


/* MAIN PROCEDURE-1 TO RUN PARALLEL */
create OR REPLACE PROCEUDRE PR_PARALLEL_RUN1
IS
BEGIN

DBMS_OUTPUT.PUT_LINE('PROCEDURE NUMBER -1');
DBMS_OUTPUT.PUT_LINE('START TIME='||SYSTIMESTAMP);
DBMS_OUTPUT.PUT_LINE('END TIME='||SYSTIMESTAMP);

END PR_PARALLEL_RUN1;

/* MAIN PROCEDURE-2 TO RUN PARALLEL */
create OR REPLACE PROCEUDRE PR_PARALLEL_RUN2
IS
BEGIN

DBMS_OUTPUT.PUT_LINE('PROCEDURE NUMBER -2');
DBMS_OUTPUT.PUT_LINE('START TIME='||SYSTIMESTAMP);
DBMS_OUTPUT.PUT_LINE('END TIME='||SYSTIMESTAMP);

END PR_PARALLEL_RUN2;

----
----
----
/* MAIN PROCEDURE-2 TO RUN PARALLEL */
create OR REPLACE PROCEUDRE PR_PARALLEL_RUN10
IS
BEGIN

DBMS_OUTPUT.PUT_LINE('PROCEDURE NUMBER -10');
DBMS_OUTPUT.PUT_LINE('START TIME='||SYSTIMESTAMP);
DBMS_OUTPUT.PUT_LINE('END TIME='||SYSTIMESTAMP);

END PR_PARALLEL_RUN10;




Also please explain the difference between DBMS_SCHEDULAR & DBMS_PARALLEL_EXECUTE package usages.


Thank you in advance!!


Thanks,
Vijay
Re: Parallel Procedure Run [message #643903 is a reply to message #643902] Wed, 21 October 2015 02:42 Go to previous messageGo to next message
John Watson
Messages: 9002
Registered: January 2010
Location: Global Village
Senior Member
DBMS_PARALLEL_EXECUTE lets you parallelize the execution of a single statement. This is not relevant to your requirement.

DBMS_SCHEDULER lets you run jobs, each of which runs (for example) a procedure, at certain times. You could look at its lightweight jobs capability, if you are going to do this regularly.
Re: Parallel Procedure Run [message #643904 is a reply to message #643902] Wed, 21 October 2015 03:05 Go to previous message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Also have a look at DBMS_SCHEDULER and DBMS_JOB.

Previous Topic: Select with Time Range
Next Topic: How to filter records from UNION ALL query
Goto Forum:
  


Current Time: Tue Jun 30 13:12:30 CDT 2026