Home » RDBMS Server » Server Administration » Regarding DBMS job
Regarding DBMS job [message #216726] Tue, 30 January 2007 03:06 Go to next message
kanis
Messages: 61
Registered: November 2006
Member
I have created a sipmle procedure ... (It will insert a value in to table and will commit , no i/p parameter and out put).
Now I want to run this proc through DBMS_Job.Submit()
with 5 min interval .

What I have to do??? what will be the script??
I am using oracle 9i and server is in winxp machine ...
Re: Regarding DBMS job [message #216757 is a reply to message #216726] Tue, 30 January 2007 04:48 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Use DBMS_JOB.SUBMIT with an interval of 5/1440.
Re: Regarding DBMS job [message #217174 is a reply to message #216757] Wed, 31 January 2007 23:45 Go to previous messageGo to next message
kanis
Messages: 61
Registered: November 2006
Member
create or replace procedure PROC_TEST_JOB AS
V_COUNT NUMBER;
BEGIN
SELECT COUNT(*) INTO V_COUNT FROM TEST_JOB;
V_COUNT := V_COUNT+1;
INSERT INTO TEST_JOB VALUES(V_COUNT,'xxx');
COMMIT;
END;
This the above procedure

and the job script is
created a job with interval 'SYSDATE+5/1440 '

DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'proc_test_job();'
,next_date => to_date('01/02/2007 11:00:17','dd/mm/yyyy hh24:mi:ss')
,interval => 'SYSDATE+5/1440 '
,no_parse => TRUE
);
END;


But this job is not runing automatically.
When i run fource fully it's running for the time only .

how it will automatically run.
Re: Regarding DBMS job [message #217232 is a reply to message #217174] Thu, 01 February 2007 04:42 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You should ensure that JOB_QUEUE_PROCESSES isn't set to zero.
Re: Regarding DBMS job [message #217255 is a reply to message #217232] Thu, 01 February 2007 06:03 Go to previous message
kanis
Messages: 61
Registered: November 2006
Member
Many thanks _______________________-
It Works.
Previous Topic: Data file size limit (merged)
Next Topic: Ora-3114 with logon trigger
Goto Forum:
  


Current Time: Mon Dec 05 04:52:41 CST 2016

Total time taken to generate the page: 0.08294 seconds