我有几个oracle程序:
原文链接:https://www.f2er.com/oracle/205226.htmlcreate or replace procedure receive_sms (p_to_date in date) is .. end;
和
create or replace procedure send_sms (p_date in date) is .. end;
我想基于这些过程创建一个链,并为链和一些规则添加步骤:
BEGIN DBMS_SCHEDULER.CREATE_CHAIN ( chain_name => 'mobile_archive_chain',rule_set_name => NULL,evaluation_interval => NULL,comments => NULL); END; / --- define three steps for this chain. Referenced programs must be enabled. BEGIN DBMS_SCHEDULER.DEFINE_CHAIN_STEP('mobile_archive_chain','send','inforpilla.send_sms'); DBMS_SCHEDULER.DEFINE_CHAIN_STEP('mobile_archive_chain','receive','inforpilla.receive_sms'); END; / --- define corresponding rules for the chain. BEGIN DBMS_SCHEDULER.DEFINE_CHAIN_RULE ('mobile_archive_chain','TRUE','START send'); DBMS_SCHEDULER.DEFINE_CHAIN_RULE ('mobile_archive_chain','send COMPLETED','Start receive'); DBMS_SCHEDULER.DEFINE_CHAIN_RULE ('mobile_archive_chain','receive COMPLETED','END'); END; / --- enable the chain BEGIN DBMS_SCHEDULER.ENABLE('mobile_archive_chain'); END; / --- create a chain job to start the chain daily at 1:00 p.m. BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'start_archive',job_type => 'CHAIN',job_action => 'mobile_archive_chain',repeat_interval => 'freq=daily;byhour=15;byminute=3;bysecond=0',enabled => TRUE); END; /
但是检查日志表我发现作业失败了ERROR代码:27475
SELECT * from USER_SCHEDULER_JOB_RUN_DETAILS ORDER BY LOG_DATE DESC
CHAIN_LOG_ID="201095" CHAIN_LOG_ID="201095",STEP_NAME="RECEIVE",ORA-27475: "TEST.RECEIVE_SMS" must be a PROGRAM OR CHAIN CHAIN_LOG_ID="201095",STEP_NAME="SEND",ORA-27475: "TEST.SEND_SMS" must be a PROGRAM OR CHAIN