run .cmd file from SSIS but on another server (not a sql server)

  • Hi - anyone got any thoughts on how to go about this. The other server is non sql - just a plain windows server box. The .cmd file runs a .exe that is installed onthe other box.

    In detail:

    SQL box A SSIS needs to execute a .cmd file stored on Windows box B

    Windows box B runs it's .cmd file that file runs a .exe also installed on box B

    Clear as mud?

    Thanks

    Allen

  • I've done that successfully by using PsExec.

    http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

    Edit: removed typo



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Thanks Alvin - I had not heard of that before.

    Will post back.

    Cheers

    Allen

  • I will suggest the same solution as Alvin. PsExec utilities are really handy for performing remote actions.

    _____________________________________________________________

    [font="Tahoma"]'Some people still are alive simply because it is illegal to shoot them... o_O 😎 '[/font]

  • Thanks all who posted. PsExec did the trick first time with no fuss. Brillliant!

    Just a note for anyone else trying the same thing;

    1 The help file supplied with PsTools did not want to work on my server but the help on the website cobvered everything I needed, also I think the tools al provide /? help.

    2 The remote executable should be specified as a local path on the remote server.

    Cheers

    Allen

  • The remote executable should be specified as a local path on the remote server

    Really important point to remember. Once a colleague of mine scheduled SSIS packages on SS Agent and put their paths as \\servername\packages\package.dtsx when they were lying in "D:\packages\" on server itself 😀

    The server called me at midnight crying about cruel treatment 😛 :hehe:

    Lesson learned: Think from server's perspective, not your development pc's. 😎

    _____________________________________________________________

    [font="Tahoma"]'Some people still are alive simply because it is illegal to shoot them... o_O 😎 '[/font]

  • Hello Alvin:

    I have same issue. I have a SSIS package on Sever A and it calls a remote process XXX.cmd on Server B. As you suggested in this post, I install PStool, PSexec on Server B. but don't know how to config Execute process Component in SSIS package to make it work. Can you give me some detailed instruction on that? and do i need to put PsExecute in my CMD file?

    Thank you!

  • BTW, I use SSIS 2012

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply