GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 3 of 166    Print  
How can we schedule the procedure to run automatically ?

  
Total Answers and Comments: 6 Last Update: April 06, 2006     Asked by: kishorebabu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: praveen.pinisetti
 

1)Using DBMS_JOB package,we can schedule the job.

There are number of built-in functions in that package to schedule a job.

Ex:

DBMS_JOB .SUBMIT

DBMS_JOB .RUN.

2) Using DBMS_SCHEDULER

THIS I SYNTAX FOR CREATING JOB

dbms_scheduler.create_job(
ob_name             IN VARCHAR2,
job_type            IN VARCHAR2,
job_action          IN VARCHAR2,
number_of_arguments IN PLS_INTEGER DEFAULT 0,
start_date          IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
repeat_interval     IN VARCHAR2 DEFAULT NULL,
end_date            IN TIMESTAMP WITH TIME ZONE DEFAULT NULL,
job_class           IN VARCHAR2 DEFAULT 'DEFAULT_JOB_CLASS',
enabled             IN BOOLEAN DEFAULT FALSE,
auto_drop           IN BOOLEAN DEFAULT TRUE,
comments            IN VARCHAR2 DEFAULT NULL);



Above answer was rated as good by the following members:
sboege
September 23, 2005 03:47:30   #1  
BALAKRISHNA        

RE: How can we schedule the procedure to run automatic...
WE CAN SCHEDULE THE PROCEDURE RUN AUTOMATICALLY BY USING PACKAGES.
 
Is this answer useful? Yes | No
September 27, 2005 05:33:13   #2  
Ramesh Member Since: September 2005   Contribution: 1    

RE: How can we schedule the procedure to run automatic...

Thanks.. Can you give any example for this..

Regards

Ramesh G


 
Is this answer useful? Yes | No
September 28, 2005 00:58:44   #3  
Ramesh        

RE: How can we schedule the procedure to run automatic...

Friends

We can use dbms_job in-built dbms package.

Regards

Ramesh G


 
Is this answer useful? Yes | No
September 30, 2005 01:53:36   #4  
BALAKRISHNA        

RE: How can we schedule the procedure to run automatic...
using packages
 
Is this answer useful? Yes | No
October 20, 2005 03:08:02   #5  
prathima        

RE: How can we schedule the procedure to run automatic...

procdures can be scheduled to execute periodically by using the job scheduler in windows based systems or by using the cron in unix based systems.

GOTO toad->click on JOB tab-> right click on the list below and select create a new job menu.

Job definition window will open up.

Now enter all the relavent details along with the procedure name along with the parameters.

This will create a new job.

If you want to setup a cron to execute the procedure then you will have to write the shell script to connect the database and execute the procedure.

then call the shell script file inside the cron script.

eg:

25 14 * * * /path of the shell script/filename.sh


 
Is this answer useful? Yes | No
April 06, 2006 07:26:30   #6  
praveen.pinisetti Member Since: April 2006   Contribution: 6    

RE: How can we schedule the procedure to run automatic...

1)Using DBMS_JOB package we can schedule the job.

There are number of built-in functions in that package to schedule a job.

Ex:

DBMS_JOB .SUBMIT

DBMS_JOB .RUN.

2) Using DBMS_SCHEDULER

THIS I SYNTAX FOR CREATING JOB

dbms_scheduler.create_job(
ob_name IN VARCHAR2
job_type IN VARCHAR2
job_action IN VARCHAR2
number_of_arguments IN PLS_INTEGER DEFAULT 0
start_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
repeat_interval IN VARCHAR2 DEFAULT NULL
end_date IN TIMESTAMP WITH TIME ZONE DEFAULT NULL
job_class IN VARCHAR2 DEFAULT 'DEFAULT_JOB_CLASS'
enabled IN BOOLEAN DEFAULT FALSE
auto_drop IN BOOLEAN DEFAULT TRUE
comments IN VARCHAR2 DEFAULT NULL);


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape