iSelfSchooling.com  -  Since 1999  References  |  Job Openings  |
    Home  | Search more  | Oracle Syntax  | Instructor-Led in Class   | Members - (Thousands)
 

Copyright & User Agreement

   Suggestions Email2aFriendHomepage us! |  Bookmark

Services

  Vision/Mission

  Services

  Biography

  Contact Us

 FREE Training

  Start...

  SQL

  PL/SQL

  Forms 

  Reports

  DBA Fundamentals

  Performance

  Prepare for OCP

  Instructor-Led

  ShareUrNotes

. . .

  Acknowledgement

  Who is who

  University Directory

  Links...

 

 

 

How to submit, run, and remove a job?

As a programmer you have been assigned to submit a job to run a stored procedure called “clean_the_tables” every one hour in Oracle.

 

More Resources by Google:

 

By: John Kazerooni

-- Define “v_jobno” as a binding variable:

VARIABLE v_jobno NUMBER

 

-- Submit the job.

EXECUTE dbms_job.submit (:v_jobno, ‘clean_the_tables;’, sysdate, ‘sysdate + (1/24)’);

 

-- Print the job number

PRINT v_jobno

-OR-

SELECT :v_jobno FROM dual;

-OR-

SELECT job FROM user_jobs ORDER BY job;  -- the last number.

 

-- Run the job.

EXECUTE dbms_job.run (:v_jobno);

 

-- Remove the job.

EXECUTE dbms_remove(:v_jobno);

 

 
 
Google
 
Web web site