Home > Blockchain >  Oracle enable/disable jobs inside procedure with schema name included
Oracle enable/disable jobs inside procedure with schema name included

Time:01-13

I need to specify my schema name inside DBMS_SCHEDULER.ENABLE function, DBMS_SCHEDULER.ENABLE ('myjob'); is working well but what if i have same named job belong different schemas? How can i specify my schema job name inside DBMS_SCHEDULER.ENABLE ?
i tried DBMS_SCHEDULER.ENABLE ('myschema.myjob');
but it doesnt working.

CodePudding user response:

You're running DBMS_SCHEDULER connected as some user.

If you want to enable job that belongs to e.g. user Ayberk, then you'd connect as ayberk and run DBMS_SCHEDULER.ENABLE ('myjob').

If you want to enable job that belongs to user Littlefoot, connect as littlefoot and run DBMS_SCHEDULER.ENABLE ('myjob') (but this time it'll affect job that belongs to littlefoot).

Why would user ayberk do anything with littlefoot's jobs?

CodePudding user response:

Instead of DBMS_SCHEDULER.ENABLE,
I tried Sys.Dbms_Scheduler.Enable (Name => 'myschema.myjob'); and it works for me. :)

  •  Tags:  
  • Related