'오라클 백업설정'에 해당되는 글 1건

Oracle DBMS_SCHEDULER 백업 설정 스크립트



1. create_program 


BEGIN

  -- Shell Script.

  DBMS_SCHEDULER.create_program (

    program_name        => 'hotbackup_executable_prog',

    program_type        => 'EXECUTABLE',

    program_action      => '/backup/hotbackup/test.sql',

    number_of_arguments => 0,

    enabled             => TRUE,

    comments            => 'Program to gather SCOTT''s statistics us a shell script.');

        END;

/


2. create_schedule 


BEGIN

  DBMS_SCHEDULER.create_schedule (

    schedule_name   => 'test_min_schedule',

    start_date      => SYSTIMESTAMP,

    repeat_interval => 'freq=MINUTELY; INTERVAL=30',

    end_date        => NULL,

    comments        => 'Repeats hourly, on the hour, for ever.');

END;

/


3. create_job 


BEGIN

  DBMS_SCHEDULER.create_job (

    job_name      => 'test_prog_sched_job_definition',

    program_name  => 'hotbackup_executable_prog',

    schedule_name => 'test_min_schedule',

    enabled       => TRUE,

    comments      => 'Job defined by an existing program and schedule.');

            END;

/


블로그 이미지

운명을바꾸는자

IT와 함께 살아가는 삶

,