BC remote Oracle DBA - Call (800) 766-1884
Free Oracle Tips

Oracle Consulting Oracle Training Development
 
Oracle Home
Oracle Training
SQL Tuning Consulting
Oracle Tuning Consulting
Data Warehouse Consulting
Oracle Project Management
Oracle Security Assessment
Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Oracle Monitoring
Remote Support Benefits
Remote Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 
 

Automating Oracle

Oracle Tips by Mike Ault

The DBMS_JOB Package

An example using the SUBMIT procedure would be:

 VARIABLE x NUMBER:

EXECUTE DBMS_JOB.SUBMIT(:x,’BEGIN testit; END;’,SYSDATE,’SYSDATE+(15/1440)’);

In the first example, the job would be created and assigned the job number 999. The advantage to this form of submission is that it allows the Remote DBA to specify the job number so that for future work with the specific job, the number is already known. In the second example, the job receives a job number from an internal queue which then requires either reading and recording the “x” variable or looking at the Remote DBA_JOBS view to find the job number for a specific “WHAT”.

To run a job immediately you use the DBMS_JOB.RUN procedure specifying the job number for the specific job. To remove a procedure you use the DBMS_JOB.REMOVE procedure specifying the job number of the job to be removed. You cannot remove a running job.

SEE CODE DEPOT FOR FULL SCRIPTS


For more information on this topic, I recommend Don Burleson's latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 50%-off and get instant access to the code depot of Oracle tuning scripts:

http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call BC Remote DBA today.

 

 

 

Remote DBA Service
 

Free Oracle dictionary reference poster

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

North Carolina Oracle Users Group

 

 Arabian horse breeder

Seeing eye horses

 

 

Burleson is the American Team

American Flag

 

 

BC Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA

 

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter