Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch job to run stored procedure

Status
Not open for further replies.

kam3t

Programmer
Dec 3, 2003
2
US
I need to create a batch job to run an Oracle stored proc every Monday at 4am.

Our oracle instance is not a management server, it is stand alone and therefore I do not have access to schedule jobs via the EMC. (I do not try to pretend to be a DBA, but that is the answer that I received when I asked about it).

What is the syntax to kick off the stored proc in a batch file (*.bat)? So that I can schedule it using the AT command.

TIA.
 
The .bat file will be:

sqlplus myuser/mypasswd@connect_identifier @mycommandfile.sql

In mycommandfile.sql file write the sqlplus commands you need:

-- sqlplus commands

BEGIN
MYPROCEDURE(param1,param2,...);
END;
/
 
Please consider using DBMS_JOB to create a Job that runs u'r stored proc on db server at predefined time.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top