|
- select * from scheduler_test;
- alter table scheduler_test add ( event_name varchar2(40)) ;
- create or replace procedure procnew( p_1 sys.t_event_queue_payload )
- is
- BEGIN
- INSERT INTO scheduler_test
- VALUES (scheduler_test_seq.NEXTVAL,'NEW', SYSDATE, p_1.event_name );
- COMMIT;
- END;
- /
- begin
- dbms_scheduler.create_program (
- program_name => 'programnew',
- program_action=> 'procnew',
- program_type => 'STORED_PROCEDURE',
- number_of_arguments => 1,
- enabled => false) ;
- end;
- /
复制代码- select * from user_scheduler_program_args;
- begin
- dbms_scheduler.define_metadata_argument (
- program_name => 'programnew',
- argument_position => 1 ,
- metadata_attribute => 'EVENT_MESSAGE') ;
- end;
- /
- begin
- dbms_scheduler.enable ('programnew');
- end;
- /
复制代码- BEGIN
- sys.dbms_scheduler.create_job(
- job_name => '"HR"."JOB9"',
- program_name => '"HR"."PROGRAMNEW"',
- schedule_name => '"HR"."SCHEDULE4"',
- job_class => '"DEFAULT_JOB_CLASS"',
- auto_drop => FALSE,
- enabled => TRUE);
- END;
复制代码
|
|