1.

Solve : Controling external programs using batch files?

Answer»

Hello!

I am trying to write a BATCH file to be sceduled to occur overnight on a monthly basis to alter tables in an oracle RDMS.

I can get the batch file to open the external program, sqlPlus, in the cmd, but cannot get the batch file to input any commands into sqlPlus.

Does anyone know of any way I can input commands into sqlPlus with the batch file?

Thanks!A batch file is not going to be able to do input or send data to a third-party program (it is not something that it is meant to do). What you would likely NEED to do is have the batch file run another third-party program that is designed to manipulate or enter data into sqlPlus.

The only thing I can think of (off the top of my head) capable of doing something like this would be AutoIt: http://www.hiddensoft.com/AutoIt/I have found the solution to this problem! To pass commands to sql*PLUS, I entered the commands into a TEXT file and saved it with the extention .sql. I then called the .sql file in the BATCH file and it worked! JOB done!



Discussion

No Comment Found