我有一个DBMS_JOB作业声明如下
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'GET_ENAGAS_INVOICES_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN LOPES.GET_ENAGAS_INVOICES; END;',
repeat_interval =>'FREQ=MINUTELY; INTERVAL=5; BYHOUR=9,22; BYDAY=TUE,WED,THU,FRI,SAT,SUN',
enabled => TRUE,
comments => 'GET_ENAGAS_INVOICES');
END;
/
我在包中移动了这个程序,我想知道是否仍然可以运行作业
答案 0 :(得分:1)
是的,只需使用SCHEMA_NAME.PACKAGE_NAME.PROCEDURE_NAME
:
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'GET_ENAGAS_INVOICES_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN LOPES.PACKAGE_NAME.GET_ENAGAS_INVOICES; END;',
repeat_interval =>'FREQ=MINUTELY; INTERVAL=5; BYHOUR=9,22; BYDAY=TUE,WED,THU,FRI,SAT,SUN',
enabled => TRUE,
comments => 'GET_ENAGAS_INVOICES'
);
END;
/