user3310812
user3310812

Reputation: 11

How to schedule a insert script in Oracle 12c DB

I have a DB Table and i would like insert statement into this DB table in every 1 hr. Please help

Upvotes: 1

Views: 792

Answers (1)

hotfix
hotfix

Reputation: 3396

you can use a db scheduler. Have a look at DBMS_SCHEDULER there a lot of function that you can use to manage your schduler Job

e.g. you can create a job that will start every hour

BEGIN
  DBMS_SCHEDULER.CREATE_JOB (
   job_name          =>  'name of your job',
   program_name      =>  'stored procedure that will be executed', 
   repeat_interval   =>  'FREQ=HOURLY; INTERVAL=1',
   start_date        =>   systimestamp, -- when the Job will start first
   comments          =>  'descripn of the job');
END;

in a procedure you can specify tast that will be done.

Upvotes: 1

Related Questions