SQLCrazyCertified (3/20/2013)
Eugene Elutin (3/20/2013)
Not really good idea to do so, but if you really need it, use xp_cmdshell.
xp_cmdshell 'c:\MyBatch.bat'
Thanks Eugene, what you mean by not really good idea?....what are the alternatives, if there is any? Please advise if you don't mind.
Thanks,
SueTons.
Why do you want to run batch file from within SQL Server procedure?
What this batch is going to do?
There is a great alternative: don't do it from sql.