2009년 8월 23일 일요일

Scheduler

▣ Scheduler 생성 (5초 간격)

   

▣ 생성한 Scheduler를 Job에 등록

   

▶ Show SQL

   

▣ 실제로 테이블에 insert 되는지 확인

   

▶ 참고 (Job Enable & Disable)

   

▣ 관련 뷰

   

▣ Time-Based Schedule

▶ SQl

BEGIN

DBMS_SCHEDULER.CREATE_JOB(

job_name=>'HR.DO_BACKUP',

job_type =>'EXECUTABLE',

job_action => '/home/usr/rman/nightly_incr.sh',

start_date=>SYSDATE,

repeat_interval=>'FREQ=DAILY;BYHOUR=23',

/* next night at 11:00 PM */

comments=> 'Nightly incremental backups');

End;

/

   

▣ Event-Based Schedule

  • A queue specification (where your application enqueues messages to start a job)
  • An event condition (same syntax as an Oracle Streams AQ(Access Queue) that if TRUE starts th job

   

▶ Event raised by Scheduler Jobs

  • JOB_STARTED
  • JOB_SUCCEEDED
  • JOB_FAILED
  • JOB_BROKEN
  • JOB_COMPLETED
  • JOB_STOPPED
  • JOB_SCH_LIM_REACHED
  • JOB_DISABLED
  • JOB_CHAIN_STALLED
  • JOB_ALL_EVENTS
  • JOB_RUN_COMPLETED
  • JOB_OVER_MAX_DUR

댓글 없음:

댓글 쓰기