0

我有一个 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;
/

我将此过程移到了一个包中,我想知道是否仍然可以运行该作业

4

1 回答 1

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;
/
于 2018-02-13T10:25:02.830 回答