Home » SQL & PL/SQL » SQL & PL/SQL » DBMS Job (Wait for complete to go next process)
DBMS Job (Wait for complete to go next process) [message #577043] Tue, 12 February 2013 02:30 Go to next message
usmanelahi
Messages: 53
Registered: July 2007
Location: Karachi
Member

Hello Gurus,

Hope you all are fine and doing very well

I have a package which is in two procedures.
one procedure is calling dbms job and the second one is insert/update dependent on first package

when i run the package both procedures run without waiting for first procedure

Please tell me how do i wait for first procedure and then go to second one
Re: DBMS Job (Wait for complete to go next process) [message #577049 is a reply to message #577043] Tue, 12 February 2013 02:48 Go to previous messageGo to next message
Michel Cadot
Messages: 58907
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to put more.
PL/SQL executes sequentially, if you call 2 procedures then the second one does not execute before the first one ends.

Regards
Michel
Re: DBMS Job (Wait for complete to go next process) [message #577054 is a reply to message #577049] Tue, 12 February 2013 02:56 Go to previous messageGo to next message
usmanelahi
Messages: 53
Registered: July 2007
Location: Karachi
Member

But sir my first procedure calling dbms_job.sumbit the job is around 2 hours
Re: DBMS Job (Wait for complete to go next process) [message #577057 is a reply to message #577054] Tue, 12 February 2013 02:57 Go to previous messageGo to next message
Michel Cadot
Messages: 58907
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to post more on your problem.
If you don't want to post the actual code then create a test case that shows what it is.

Regards
Michel
Re: DBMS Job (Wait for complete to go next process) [message #577071 is a reply to message #577057] Tue, 12 February 2013 03:07 Go to previous messageGo to next message
usmanelahi
Messages: 53
Registered: July 2007
Location: Karachi
Member

execute immediate 'PACKAGE.PROCEDURE1'; -- dbms_job.sumbit
execute immediate 'PACKAGE.PROCEDURE2'; -- INSERT Data (Defendant on completion of FIRST PROCEDURE1)

please tell me how to handle this


Re: DBMS Job (Wait for complete to go next process) [message #577075 is a reply to message #577071] Tue, 12 February 2013 03:13 Go to previous message
Michel Cadot
Messages: 58907
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It depends what you have in PROCEDURE1?
And why do you use EXECUTE IMMEDIATE to call a procedure?

In addition, if PROCEDURE2 is dependent on result of PROCEDURE1, why do you want to execute it BEFORE the first procedure ends? Won't it find missing or invalid data?

Regards
Michel

[Updated on: Tue, 12 February 2013 03:13]

Report message to a moderator

Previous Topic: Parallel Process
Next Topic: Minus operator and NULL
Goto Forum:
  


Current Time: Wed Aug 27 12:12:16 CDT 2014

Total time taken to generate the page: 0.11120 seconds