Scheduled JOB, Oracle DB
BEGIN
dbms_scheduler.create_schedule(
schedule_name => 'INTERVAL_EVERY_1_MINUTES',
start_date => trunc(sysdate),
repeat_interval => 'freq=MINUTELY',
comments => 'Runtime: Every minut');
dbms_scheduler.create_program
(program_name=> 'PROG_DO_HR_INSERT',
program_type=> 'PLSQL_BLOCK',
program_action=> 'BEGIN INSERT INTO HR.HEXA VALUES('actiont','FRM MINUT SCHEDULE-R'); COMMIT; END',
enabled=>true,
comments=>'Procedure to save sample Data to \hexa table every Minut'
);
dbms_scheduler.create_job
(job_name => '30_OCT_2011_Job1',
program_name=> 'PROG_DO_HR_INSERT',
schedule_name=>'INTERVAL_EVERY_1_MINUTES',
enabled=>true,
auto_drop=>false,
comments=>'Job to save sample Data to \hexa table every Minut');
COMMIT;
END;
No comments:
Post a Comment