Pages

Search This Blog

Tuesday, 14 February 2012

CREATING JOB IN ORACLE

This job responds to the system events. The following job is executed daily for every 5 minutes which deletes records in a table periodically. The job in turn invokes a stored procedure called delrows . The description for delrows procedure is given in the previous post.


JOB IN ORACLE
SQL>BEGIN
2    DBMS_SCHEDULER.CREATE_JOB (
3    job_name          =>  'refresh_db',
4    program_name      =>  'delrows',
5    repeat_interval   =>  'FREQ=DAILY;BYMINUTE=5',
6    comments          =>  'delete records every 5 mins');
7    END;
/
refresh_db-name for job
delrows-procedure name to be executed

No comments:

Post a Comment