If you are having problems with the syntax for the dtsrun
command line, or just want an easy way of generating a valid command
line first time, try using the dtsrunui utility. As the name indicates
it is very similar to dtsrun, but with a user interface. This allows you to
easily select your package, including settings for global variables and
logging, then use the generate function to create a valid dtsrun
command line.
There is no shortcut provided for dtsrunui, so just type
dtsrunui in the Windows Run dialog or from a command prompt.
Select the storage location and then select your package as shown below.
Click Advanced to set options such as global variables and logging, and
access the Generate function.
The example shown has two global variables which are
being set, which result in two instances of the /A parameter included in the
generated command line.
The command will also contain either the version GUID or
package GUID, depending on if you selected a specific version or the
package only. Since the command line also contains the name, and only one of
the three is required, and since most people think in names not GUIDs it is
usual to remove the GUID and just leave the name. This ensures that if
you change the package or replace it, in a way such that the specified
GUID changes, you do not have to update the command line string.
For example, the example command line is:
DTSRun /S "(local)" /N "MyPackage"
/V "{92A57960-D9E1-40F4-9919-5773E9E35F12}"
/A "MyStringVar":"8"="String Value"
/A "MyIntegerVar":"3"="1" /W "0" /E
For flexibility this can be shortened to:
DTSRun /S "(local)" /N "MyPackage"
/A "MyStringVar":"8"="String Value"
/A "MyIntegerVar":"3"="1" /W "0" /E
dtsrunui also supports creating encrypted command lines, as is
the default when using the Schedule Package function within Enterprise
Manager. These no longer provide protection as there is at least one public
tool that allows the decryption of the cipher text. There is some risk
mitigation in the restriction that only members of the sysadmin
role or job owners can see the details of a given job.