January 17, 2006 at 1:00 am
Hello,
I have a situation where I have to run an exe file through a stored procedure or using some sql query.
I tried using master..xp_cmdshell 'myprog.exe' but I get the message that
'myprog.exe' is not recognized as an internal or external command, operable program or batch file.
Please guide me if I am doing something wrong here. And if there is another way to achieve this result please tell me.
Thanks
Bye
January 17, 2006 at 1:18 am
You need to specify the full path to myprog.exe, or have it in the path environment variable (for the account SQL Server is running under).
January 17, 2006 at 1:46 am
I am specifying the complete path like,
Exec master..xp_cmdshell 'd:\myclient.exe'
but it is still giving the same message
Thanks
January 17, 2006 at 2:48 am
Is D:\myclient.exe a path that exists on the server, i.e. not your client computer?
January 18, 2006 at 2:46 am
Even more important....DON'T try to run an EXE via a SP.....you're lining up some bad problems for yourself. SP's can't run/launch interactive EXE's and you could overload your server. I've read advice (here and elsewhere) to support this....a search should turn up the relevent items.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply