One of the nice features about the dtsrun command that came with DTS2000 was the ability to populate a package global variable from the command line. i.e.:
dtsrun /S MyServer /E /N MyPackage /A MyGlobalVar:8=
The replacement for dtsrun in SSIS, DTExec, has a similar mechanism. It uses the /Set switch. In fact, its better than dtsrun because it can be used to set any property of an executable or a variable as opposed to just a variable value. To look at it another way, you can basically do stuff on the command line that you used to have to do using a Dynamic Properties task.
The syntax of the /Set switch is /set propertypath;value
propertyPath is, unsurprisingly, the path to a property in the package. It has its own syntax. The path must start with "\Package". Backslash notation is used to navigate through the package object hierarchy to an object, and thereafter dot notation is used to access a property of that object.
For example, to change the 'Disable' property of a data flow called 'MyDataFlow' that is in a Foreach loop container called 'MyForeachLoop' the /set switch would look like this:
- /set \Package\MyForEachLoop\MyDataFlow.Disable;False
An easy way of viewing the property path of a property is to create an XML configuration file for the package referencing the property in question. The resultant .dtsconfig file will contain the property path.
Lastly, a further utility called DTExecUI is provided that will build the command line string for you in exactly the same way that dtsrunui did for DTS2000.
As ever...I'd welcome some feedback!!!
- Jamie