Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Execute Simultaneous Synchronous Oracle Jobs

Expert Oracle Database Tips by Donald BurlesonMarch 21, 2015

 

Question:  I have two jobs that I want to execute at the same time, synchronously, and I need to know how to make the jobs start simultaneously. 

This code did not start the jobs at the same time:

dbms_job.submit(jobno1,'pc;', next_date=>SYSDATE);
dbms_job.submit(jobno2, 'pc2;', next_date=>SYSDATE);
dbms_job.run(jobno1);
dbms_job.run(jobno2);

How do I get many jobs to run simultaneously in Oracle?

Answer:  Whether you are using dbms_job or dbms_scheduler, when you submit many jobs at the same time, they will begin to execute simultaneously, unless you have configured the job scheduler to asynchronous mode.  

See my notes on manipulating SYSDATE for complex Oracle job scheduling.

The question is how to run ad-hoc jobs simultaneously or synchronously!

With vanilla SYSDATE, one job will start a few fractions of a second before the other job!

What you want is to make both jobs wait until the same time.

You might try the next minute and then see if the jobs start at the exact same time . . .

Try something like the following. I have not tried this code, but the concept is to add one minute to SYSDATE and then truncate the date format to minutes only.

Hopefully, something like this will force the jobs to submit at the same time . . .

next_date=>(SYSDATE,'mm/dd/yyyy hh24:mi')+((SYSDATE,'mm/dd/yyyy hh24:mi')+1)/24/60

Oracle allows for very complex date scheduling arithmetic, and I have complete references and working examples of submitting Oracle jobs here.  

For a complete treatment of job scheduling, see the book "Oracle Job Scheduling".   It has working code examples in the book code download.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster