Home » RDBMS Server » Server Administration » Call Stored procedure with specific time
Call Stored procedure with specific time [message #369785] Wed, 11 October 2000 12:02 Go to next message
sabarinathan
Messages: 1
Registered: October 2000
Location: coimbatore
Junior Member
Can anyone help me out how to call stored procedure with specific time. If know please send me a tips or
any examples..

Thanxs
Re: Call Stored procedure with specific time [message #369786 is a reply to message #369785] Wed, 11 October 2000 12:24 Go to previous messageGo to next message
Suresh
Messages: 189
Registered: December 1998
Senior Member
Use dbms_job.submit() to schedule your jobs.
Re: Call Stored procedure with specific time [message #369805 is a reply to message #369786] Fri, 13 October 2000 13:03 Go to previous messageGo to next message
Suresh.N
Messages: 41
Registered: March 2000
Member
Hi Suresh!

I tried like by using Dbms_Job.Sumbit...

CREATE TABLE T1(DATETIME VARCHAR2(20));

CREATE OR REPLACE PROCEDURE P1
IS
BEGIN
INSERT INTO T1 VALUES
(TO_CHAR(SYSDATE,'DD/MM/YYYY 24HH:MI:SS'));
END ;

procedure created..

DECLARE
JOBID NUMBER;
BEGIN
DBMS_JOB.SUBMIT(JOBID,'P1',SYSDATE+1);
END;

Error while executing the above..

Please give sugestion.
Correct me I am wrong..
How to use the Dbms_Job.Submit.

If I want to execute that procedure for every hour what should i do?

Thanks and Reagrds
Suresh.N
Re: Call Stored procedure with specific time [message #369806 is a reply to message #369786] Fri, 13 October 2000 13:18 Go to previous message
Suresh
Messages: 189
Registered: December 1998
Senior Member
pass 4 params to dbms_job.submit procedure
1. jobno out parameter
2. job to do
3. next time to be executed (sysdate is default)
4. interval
change your pl/sql block to
DECLARE
JOBID NUMBER;
BEGIN
DBMS_JOB.SUBMIT(JOBID,'P1',sysdate,SYSDATE+1);
END;

Suresh
Previous Topic: DATABROWSER v2.0 and ORA 816
Next Topic: nth maximum salary
Goto Forum:
  


Current Time: Sun Dec 22 16:02:37 CST 2024