I have a job in my oracle database and for some reason i need to call it within my java application.
Anyone has an idea to tell me how?
I already tried:
execute DBMS_SCHEDULER.RUN_JOB('My_job_name')
DBMS_SCHEDULER.RUN_JOB('My_job_name')
{DBMS_SCHEDULER.RUN_JOB('My_job_name')}
{execute DBMS_SCHEDULER.RUN_JOB('My_job_name')}
by CallableStatement but none of them worked.
Any help would be appreciated
Do you have the priviliges do run it? if yes i guess that the job must be disabled Run the following procedure to enable it :
exec DBMS_SCHEDULER.ENABLE (My_job_name);
And let me know what you got.
Just wrap the scheduler call in a BEGIN-END block:
CallableStatement callStmt = conn.prepareCall(
"BEGIN DBMS_SCHEDULER.RUN_JOB(job_name => 'My_job_name'); END;");
callStmt.executeUpdate();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.