1

I need to call a Scheduler "DBMS_SCHEDULER.ENABLE('some_job')" from java. I tried to call it like

CallableStatement cs = = con.prepareCall("{exec DBMS_SCHEDULER.disable('some_job')}");

cs.executeUpdate();

Also replaced exec with call, but doesn't seem to be working.

If anyone has an idea on how to call please share.

Nisha
  • 89
  • 1
  • 2
  • 10
  • If I replace exec with call I'm getting Error Code: 27476, SQL State: 99999] ORA-27476: 'UDMF_UI.GETSCHEMA_file_load_job' does not exist. I'm getting the same error also when I try "select DBMS_SCHEDULER.disable('UDMF_UI.GETSCHEMA_file_load_job') from dual; – dsp_user Aug 24 '16 at 08:54
  • @Nisha Why you need this to call from java? Can you please justify. You can place this line in function or a procedure and just call those . – Karthik Aug 24 '16 at 08:58
  • 1
    Thanks Karthik! I just did not think in that angle. That works for me :) – Nisha Aug 24 '16 at 09:28
  • But just to confirm, isn't there a way to call a scheduler from java? – Nisha Aug 24 '16 at 09:29
  • @Nisha I don't know exactly. But as far i know you can call dbms_schduler from batch/shell script .you can call those scripts from java. Else instead of using dbms package you can use java quartz schedulers for job scheduler. Its better always to place all database stuffs inside a procedure and call that procedure . – Karthik Aug 24 '16 at 10:06

0 Answers0