Home » RDBMS Server » Performance Tuning » dbms_job (oracle 10g)
dbms_job [message #486267] Tue, 14 December 2010 09:59 Go to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
I am creating 5 dbms_job at run time in side a stored procedure.But when I execute that procedure, all the job get 100%cpu and as a result other process does not get response. so my question is can we limit the dbms_job to use a defined amount of cpu%.

Thanks
Re: dbms_job [message #486268 is a reply to message #486267] Tue, 14 December 2010 10:01 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>so my question is can we limit the dbms_job to use a defined amount of cpu%.
NO
Re: dbms_job [message #486270 is a reply to message #486268] Tue, 14 December 2010 10:07 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
ok. Could you please help me in the thread which i opened with the name dbms_lob.append.
Re: dbms_job [message #486285 is a reply to message #486267] Tue, 14 December 2010 11:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
so my question is can we limit the dbms_job to use a defined amount of cpu%.

If your current CPU usage (without job) is 100% then the answer is yes, using resource manager and defining resource group and so on.

Regards
Michel
Re: dbms_job [message #486296 is a reply to message #486285] Tue, 14 December 2010 11:57 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
suppose i create 10 jobs at a time, so is there any way to create depndency so that when first job complete then only second job will start and once the second will finish then third one will start and so on.
Re: dbms_job [message #486298 is a reply to message #486296] Tue, 14 December 2010 12:00 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>so is there any way to create depndency
only single job is required
DECLARE
BEGIN
TASK1;
TASK2;
TASK3;
END;
Re: dbms_job [message #486304 is a reply to message #486298] Tue, 14 December 2010 12:14 Go to previous messageGo to next message
prashant_ora
Messages: 196
Registered: July 2010
Senior Member
If i submit 10 jobs at a time and in every job one common proc is calling with different parameter, so my question is that whethere all the 10 jobs use the same session to call the proc or they create different different session and call the proc.
Re: dbms_job [message #486305 is a reply to message #486304] Tue, 14 December 2010 12:15 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Different session
Re: dbms_job [message #486307 is a reply to message #486296] Tue, 14 December 2010 12:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
prashant_ora wrote on Tue, 14 December 2010 18:57
suppose i create 10 jobs at a time, so is there any way to create depndency so that when first job complete then only second job will start and once the second will finish then third one will start and so on.

I don't know if this is possible with new scheduler jobs but it is not by default with old jobs.
Why not submit the next job from the previous one instead of submitting all the jobs in the first procedure?
You can also submit all jobs in the original procedure but in broken state and change it to "not broken" in the previous job.
You can also use "signals" (see dbms_alert).
And so on, there are so many ways to do it.

Regards
Michel

[Updated on: Wed, 15 December 2010 14:52]

Report message to a moderator

Re: dbms_job [message #486462 is a reply to message #486307] Wed, 15 December 2010 14:23 Go to previous message
Haraprasad Hota
Messages: 4
Registered: May 2007
Location: Bangalore, India
Junior Member

If your OS is UNIX then you can take the help of shell script as well.
But jobs will be executed in different session.

Regards,
Hara
Previous Topic: When to use sub-query and when to use join
Next Topic: Tune the query
Goto Forum:
  


Current Time: Sat Apr 27 08:24:39 CDT 2024