Command Line Parameters¶
DTLoggedExec supports nearly all original DTExec parameters (differences can be found here:
DTLoggedExec vs DTExec). In addition it supports its own set of additional parameters.
Parameters must be specified using the
<parameter_name>:<parameter_value> notation.
Parameters are
case sensitive!
A sample usage to load a package from the file system, setting at run-time the value for variables
User::CustomerId and
User::Other"C:\DTLoggedExec\Any\DTLoggedExec.exe" /FILE:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\Test Package 1.dtsx" /Set:"\Package.Variables[User::CustomerId].Properties[Value];10"
/Set:"\Package.Variables[User::Other].Properties[Value];Sample String"
Available Parameters
| Parameter | ShortName | Description | Default Value |
|---|
| /ShowParams | /SP | Show parameters supported by the loaded Package |
| /LogEvents | /LE | Events to log (comma separated value list) | E |
| /ConfigFile | /Conf | Configuration file to use |
| /DTS | /DT | PackagePath |
| /Decrypt | /De | Password |
| /FILE | /F | FileSpec |
| /Password | /P | Password |
| /Set | /S | PropertyPath;Value |
| /Param | n/a | PropertyPath;Value |
| /Server | /Ser | Server |
| /SQL | /SQ | PackagePath |
| /User | /U | User name |
| /LogProvider | /LP | Log Provider class name | DTLoggedExec.LogProviders.ConsoleLogProvider |
| /ProfileDataFlow | /PDF | Activate DataFlow profiling |
| /ProfilePath | /PP | The folder where dataflow profiling data will be saved |
| /ProfileFileName | /PFN | The file name used to store profiling data. |
| /LogProviderArguments | /LPA | Additional configuration options needed by the specific Log Provider you're using |
ShowParams
Display information on
Parameters supported by the Package.
DTLoggedExec /FILE:".\Test Package 10.dtsx" /SP
LogEvents
Specifies which event should be logged. The supported events are:
| Value | Logged Event |
|---|
| C | Custom Events |
| E | Error |
| ESC | ExecutionStatusChanged |
| I | Information |
| POE | PostExecute |
| POV | PostValidate |
| PRE | PreExecute |
| PRV | PreValidate |
| P | Progress |
| T | TaskFailed |
| W | Warning |
To log Errors and Informations:
/LE:E,I
If LogEvent is not specified only the Errors will be logged.
Please note that what really happens internally is that for each selected event DTLoggedExec will send event data to the active LogProvider handler. Is a responsibility of the LogProvider to decide what to do with that informations. The default Console LogProvider, for example, will print event data to the console, while the Null LogProvider will simply trash that informations.
ConfigFile
Specifies a configuration file to extract values from. Using this option, you can set a run-time configuration that differs from the configuration that was specified at design time for the package. You can store different configuration settings in an XML configuration file and then load the settings before package execution by using the /ConfigFile option.
To specify to use the
configuration.dtsConfig config file the parameter would be:
/ConfigFile:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\configuration.dtsConfig"
It's also possibile to specify more than one configuration file to load. In this case the ConfigFile parameter must be used each time (on the same line):
/ConfigFile:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\configuration.dtsConfig"
/ConfigFile:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\configuration2.dtsConfig"
/ConfigFile:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\configuration3.dtsConfig"
Configuration will be applied to the package in the sequence they are specified in the command line. So, if the used configuration files tries to specify the value for a common object, the effective value will be the one specfied in the last configuration.
Let's say for example that all three configuration tries to set the value for the variable User::MyValue. The first configuration put it to 10, the second to 5 and the third to 60. The effectively used value would be 60.
DTS
Loads a package from the SSIS Package Store. The package_path argument specifies the relative path of the SSIS package, starting at the root of the SSIS Package Store, and includes the name of the SSIS package. If the path or file name specified in the package_path argument contains a space, you must put quotation marks around the package_path argument.
/DTS:"MyFolder/MyPackage"
Decrypt
Sets the decryption password that is used when you load a package with password encryption.
To decrypt a package encrypted with the password "Passw0rd!":
/Decrypt:Passw0rd!
FILE
Loads a package that is saved in the file system. The filespec argument specifies the path and file name of the package. You can specify the path as either a Universal Naming Convention (UNC) path or a local path. If the path or file name specified in the filespec argument contains a space, you must put quotation marks around the filespec argument.
If you want to execute the package "Test Package 1.dtsx" in "C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\" you would write
/FILE:"C:\Work\SSIS Logging\DTLoggedExec\TestPackages\TestPackages\Test Package 1.dtsx"
Password
Allows the retrieval of a package that is protected by SQL Server Authentication. This option is used only when the /SQL option is specified, and it is used to specify the password of the account specified in the "User" parameter. The
password value can be quoted.
Usage:
/Password:mypassw0rd
Set
Overrides the configuration of a variable, property, container, log provider, Foreach enumerator, or connection within a package. When this option is used, /SET changes the propertyPath argument to the value specified. Multiple /SET options can be specified.
You can determine the value of propertyPath by running the Package Configuration Wizard. The paths for items that you select are displayed on the final Completing the Wizard page, and can be copied and pasted. If you have used the wizard only for this purpose, you can cancel the wizard after you copy the paths.
For example, to set the values for the variables User::CustomerId and User::Other, the parameters would look like
/Set:"\Package.Variables[User::CustomerId].Properties[Value];10" /Set:"\Package.Variables[User::Other].Properties[Value];Sample String"
Server
When the /SQL or /DTS option is specified, this option specifies the name of the server from which to retrieve the package. If you omit the /Server option and the /SQL or /DTS option is specified, package execution is tried against the local server.
/Server:"DEMOSRV01"
SQL
Loads a package that is stored in SQL Server. The
package_path argument specifies the name of the package to retrieve. If folders are included in the path, they are terminated with backslashes ("\"). The
package_path value can be quoted. If the path or file name specified in the
package_path argument contains a space, you must put quotation marks around the package_path argument.
You can use the /User, /Password, and /Server options together with the /SQL option.
If you omit the /User option, Windows Authentication is used to access the package. If you use the /User option, the /User login name specified is associated with SQL Server Authentication.
The /Password option is used only together with the /User option. If you use the /Password option, the package is accessed with the user name and password information provided. If you omit the /Password option, a blank password is used.
To load a package named "mypackage" saved into SQL Server in "My Folder" folder, you would write:
/SQL:"\My Folder\mypackage"
User
Allows the retrieval of a package that is protected by SQL Server Authentication. This option is used only when the /SQL option is specified, and it is used to specify the account that has to be used to open the package. The
user_name value can be quoted.
Usage:
/User:dmauri
LogProvider
Used to specify the DTLoggedExec Log Provider to use. Please note the log providers class needs to be in an assembly with the same name of the class. For more information on how to create your own log provider read the
Creating your own Log Provider page.
Usage sample:
/LP:DTLoggedExec.LogProviders.ConsoleLogProvider
Default value is set to use Console Log Provider
ProfileDataFlow
With this parameter you can swith on or off the DataFlow profiling feature. If you put it into the parameters passed to DTLoggedExec command line, DataFlow profiling will be enabled. If you use this feature, you'll also need to specify the
ProfilePath and
ProfileFileName parameters.
Sample Usage:
/ProfileDataFlow /ProfilePath:"C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile" /ProfileFileName:"TestPackage6_{date}_{time}"or, you if prefer to use the more contract format:
/PDF /PP:"C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile" /PFN:"TestPackage_{date}_{time}"ProfilePath
With this parameter you specify where you want to save the file produced by DataFlow profiling feature. If you want to place your DataFlow profiling data into
C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile you will write:
/PDF /PP:"C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile" /PFN:"TestPackage_{date}_{time}"ProfileFileName
Specify the name of the DataFlow profile file that DTLoggedExec will produce when you enable the DataFlow profiling feature.
In the file name you can use the
{date} and
{time} token to have date and time respectively put in the file name. The file will always have the
.dtsDataFlowProfile extension.
So, if you want to save DataFlow profile data into a file named
TestPackage which also has date and time as a suffix, you'll write:
/PDF /PP:"C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile" /PFN:"TestPackage_{date}_{time}"This means if you run DTLoggedExec on the 1st October 2008 at 15:40:34 using the above parameters, you'll have a file named
TestPackage_20081001_154034.dtsDataFlowProfile in your
C:\Work\SSIS Logging\DTLoggedExec\DataFlowProfile folder.
LogProviderArguments
This parameter allows you to set specific options for the Log Provider you've choose to use.
Please refer to the Log Provider documentation to check what parameters are available and/or needed to make it work.