rapace3
asked on
dbms_job schedule
I am trying to schedule this stored procedure using dbms_job
dbms_job.submit(job_no,'pr _fs_del('D EC-07');', sysdate + 30/1440,'sysdate + 60/1440');
cannot make it works?
dbms_job.submit(job_no,'pr
cannot make it works?
>cannot make it works?
error messages? -> post them here.
or does the job simply not run? -> use a COMMIT after the dbms_job.submit...
error messages? -> post them here.
or does the job simply not run? -> use a COMMIT after the dbms_job.submit...
ASKER
dbms_job.submit(job_no,'be gin pr_fs_del(''DEC-07''); end;',sysdate + 30/1440,'sysdate + 60/1440');
causes this error
Oracle Error :: ORA-00900
invalid SQL statement
causes this error
Oracle Error :: ORA-00900
invalid SQL statement
what tool do you try to run that statement?
Can you try the below :
SQL> begin dbms_job.submit(job_no,'be gin pr_fs_del(''DEC-07''); end;',sysdate + 30/1440,'sysdate + 60/1440'); commit; end;
/
Thanks
SQL> begin dbms_job.submit(job_no,'be
/
Thanks
ASKER
using TOAD
here is the answer
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'pr_fs_del(''NOV-07'');'
,next_date => to_date('07/12/2007 09:30:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'SYSDATE+30/1440 '
,no_parse => TRUE
);
SYS.DBMS_OUTPUT.PUT_LINE(' Job Number is: ' || to_char(x));
END;
/
commit;
here is the answer
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'pr_fs_del(''NOV-07'');'
,next_date => to_date('07/12/2007 09:30:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'SYSDATE+30/1440 '
,no_parse => TRUE
);
SYS.DBMS_OUTPUT.PUT_LINE('
END;
/
commit;
ASKER
I had it working using toad.
Please close this question
Please close this question
Glad u cud resolve it urself. Post a refund request in the Community Support zone.
ASKER
PLEASE CLOSE THIS QUESTION.
I Have figure it oui with TOAD.
Thank you
I Have figure it oui with TOAD.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dbms_job.submit(job_no,'be
I assume job_no is a pl/sql variable. This variable will be assigned with job no once the job is submitted which you see by using dbms_output.put_line(..)
Thanks