Home » SQL & PL/SQL » SQL & PL/SQL » Running a batch file from oracle (oracle 9i,windows XP)
Running a batch file from oracle [message #388109] Mon, 23 February 2009 04:33 Go to next message
rspdharshini
Messages: 1
Registered: February 2009
Junior Member
Hi,

I want to call a batch file in a remote server from oracle of another remote server.Is it possible?
Can someone help in this?
Thanks,
Priya
Re: Running a batch file from oracle [message #388112 is a reply to message #388109] Mon, 23 February 2009 04:38 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Can the remote oracle database call a batch file that is local to it?
Re: Running a batch file from oracle [message #388662 is a reply to message #388109] Wed, 25 February 2009 21:16 Go to previous message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
as long as your privileges are good, you can drop out to the OS to call just about anything. Thus whatever you can do from the OS (more or less) you can do from inside oracle by doing a callout.

Do some googling for how to execute OS commands from the database. I seem to recall someone had a java program that did it. This was many years ago I saw it. Who knows, by now maybe oracle has a database package to support it.

However, you will find that if this is for a business with a strong DBA staff, they will likely frown heavily upon this practice. In particular they will reference security concerns so in the end, once you work through all the details, you may get blocked anyway. I suggest you ask first before you spend a good deal of your time on it.

Additionally you may find that the methods used to access the OS are not always portable. Different OS, different method. Thus for examples, doing same on WINDOWS NT might require use of a DLL file but on WINDOWS 2000, a different DLL, and on Unix something else entirely. Your code may need to be environment aware and this is not good. Most of us are not doing govenment work.

Good luck, Kevin
Previous Topic: Find the text in entire database
Next Topic: please help me in SQL statement
Goto Forum:
  


Current Time: Thu Feb 13 23:38:14 CST 2025