How to remotely run a DTSX package from bat file?

15,856

Solution 1

After a bit of research it looks like it is impossible to run DTEXEC remotely (it needs to be run locally - remote execution is not supported).

To overcome this limitation the following method seems to be broadly implemented:

  1. set up a SQL job to run the DTSX package
  2. set up a Stored Procedure to run the job
  3. use isql command line in a BAT file (remotely executed) to run the stored procedure on the relevant SQL instance (with SQL credentials and not machine credentials)

Solution 2

SSIS also exposes a web service on the hosting server. You could via code, query a machine for packages, run packages via database or file system and add / modify variables of the package programmatically via any programming platform you like.

That being said you could also set up your webservice to call your local batch file which contains your 'DETEXEC' command.

Share:
15,856
JohnIdol
Author by

JohnIdol

The world will be mine but then I'll be killed by my own AI. Or by a giant simulated C. elegans out of the OpenWorm project. You can follow me on twitter.

Updated on July 11, 2022

Comments

  • JohnIdol
    JohnIdol almost 2 years

    I am trying to remotely run a DTSX package from a bat file with this command:

    DTEXEC /DTS "\File System\MY_PACKAGE_NAME" /SERVER MY_SERVER_NAME /MAXCONCURRENT " -1 " /CHECKPOINTING OFF  /REPORTING V
    

    This is working fine locally but failing remotely (I do have admin rights on the machine I am pointing to and I have SQL permissions as well) I am getting a timeout error (Login timeout expired).