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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling MS-DOS batch file form Oracle Stored Procedure

Status
Not open for further replies.

ProDev

Programmer
Jul 9, 2003
51
US
Hi All,

How to execute a ".BAT" file from Oracle Stored Procedure ?

Thanks.
 
Hi,
I can think of one following way which can be used:
You can call a java stored procedure and in the java method you can execute os commands using exec method of runtime

Regards,
Harshini
 
I want to avoid Java n stuffs ...

Is there any other way ???

Any body out there ...

I need a .BAT file (MS-DOS batch file) make to run from Oracle PL/SQL.

Thanks
 
you can use C++ if you don't want to use Java

Ion Filipski
1c.bmp
 
Hi,
If you don't want to use java(if you have any constraints), then you can go for external procedures. For this you have to
setup listener
setup tnsnames
start the listener explicitly
write a 'C' program to execute the command and compile it as a shared library
create a library in oracle
create a wrapper procedure which calls this library

This is assuming that DOS is the underlying OS where your oracle is installed.

As far as I know executing OS commands is possible only through java stored procedures or external procedures. Java stored procedures are simpler. But again it depends on your requirement as to what you should go for..

Regards,
Harshini
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top