Home » SQL & PL/SQL » SQL & PL/SQL » DBMS_JOB (9i,,Winxp)
DBMS_JOB [message #344527] Sat, 30 August 2008 03:47 Go to next message
Messages: 7
Registered: June 2005
Location: India
Junior Member

Hi All,

I need to run the staspack report that should meet the following condition.

every 15 minutes on the 15 minutes except during our batch window of midnight until 7am, during which time we would like performance snapshots taken every 2 hours at the top of the hour (midnight, 2, 4 and 6).

As far as every 15 min, I have not problem with this, but how come I specify the time , that should meet the above condition.

hare krishna
Re: DBMS_JOB [message #344533 is a reply to message #344527] Sat, 30 August 2008 04:52 Go to previous messageGo to next message
Messages: 3202
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
It might be easier to have a procedure that is just started every 15 minutes via DMBS_JOB.

Then INSIDE the procedure either start the report, or don't start it depending on what the time is.

E.g. when it's between 00:00 and 07:00 only start it when the hour can be divided by two.
Re: DBMS_JOB [message #344544 is a reply to message #344527] Sat, 30 August 2008 07:14 Go to previous messageGo to next message
Messages: 7880
Registered: March 2000
Senior Member
Create a function that calculates the new running time based on the current time. Use the outcome of that for the interval (hm, or am I mixing up dbms_job and dbms_scheduler now...)
Re: DBMS_JOB [message #344555 is a reply to message #344527] Sat, 30 August 2008 09:49 Go to previous message
Michel Cadot
Messages: 65085
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Here's an example:

Previous Topic: SQL and PL\SQL
Next Topic: How to improve select coun(*) from table
Goto Forum:

Current Time: Sun Jul 23 21:51:30 CDT 2017

Total time taken to generate the page: 0.07254 seconds