• 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.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]