Skip to content

Instantly share code, notes, and snippets.

@troyscott
Created January 30, 2013 03:53
Show Gist options
  • Select an option

  • Save troyscott/4670479 to your computer and use it in GitHub Desktop.

Select an option

Save troyscott/4670479 to your computer and use it in GitHub Desktop.
Windows batch file for running one or more SSIS packages from the command line. The script loops though a set of packages (delimited by spaces) that share the same config file and logging.
@ECHO OFF
SET DTEXEC_PATH="C:\Program Files\Microsoft SQL Server\100\DTS\Binn\dtexec.exe"
SET PACKAGE_PATH=C:\path\to\packages\
REM LogFileConnection name should be setup in the dtsConfig file
SET PACKAGE_LOG="DTS.LogProviderTextFile;[LogFileConnection]"
REM Path to dtsConfig File (filename.dtsConfig)
SET PACKAGE_CONFIG="C:\path\to\dtsConfig"
SET PACKAGES=Package1.dtsx Package2.dtsx
FOR /d %%A in (%PACKAGES%) DO (
%DTEXEC_PATH% /FILE %PACKAGE_PATH%%%A /DECRYPT ****** /LOGGER %PACKAGE_LOG% /CONFIG %PACKAGE_CONFIG%
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment