Oracle12:调用包内的过程
Posted
技术标签:
【中文标题】Oracle12:调用包内的过程【英文标题】:Oracle12: calling a procedure inside a Package 【发布时间】:2018-02-13 10:05:32 【问题描述】:我有一个 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;
/
我将这个过程移到了一个包中,我想知道是否仍然可以运行该作业
【问题讨论】:
【参考方案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;
/
【讨论】:
以上是关于Oracle12:调用包内的过程的主要内容,如果未能解决你的问题,请参考以下文章