dtsrun Utility

The dtsrun utility allows you to retrieve, execute, delete, and overwrite a package created using Data Transformation Services. The DTS package can be stored in the Microsoft® SQL Server™ msdb database, a COM-structured storage file, or Microsoft Repository. You can display the available switches by entering

dtsrun ?

  

Syntax

dtsrun [{/? | {/[~]S server_name {/[~]U user_name [/[~]P password] | /E}
| {/[~]F filename/[~]R repository_database_name} }
{/[~]N package_name [/[~]M package_password] |
[/[~]G package_guid_string] | [/[~]V package_version_guid_string]}
[/!X] [/!D] [/!Y] [/!C]}]

Arguments
/?
Displays the command prompt options.
~
Specifies that the parameter to follow is hexadecimal text representing the encrypted value of the parameter. Can be used with the /S, /U, /P, /F, /R, /N, /M, /G, and /V options. Using encrypted values increases the security of the command used to execute the DTS package because the server name, password, and so on, are not visible. Use /!Y to determine the encrypted command.
/S server_name
Is the network name of the server running SQL Server to which to connect.
/U user_name
Is a login ID used to connect to the server running SQL Server.
/P password
Is a user-specified password used with a login ID.
/E
Specifies a trusted connection (password not required).
/N package_name
Is the name of a DTS package assigned when the package was created.
/M package_password
Is an optional password assigned to the DTS package when it was created.
/G package_guid_string
Is the package ID assigned to the DTS package when it was created. The package ID is a GUID.
/V package_version_guid_string
Is the version ID assigned to the DTS package when it was first saved or executed. A new version ID is assigned to the DTS package each time it is modified. The version ID is a GUID.
/F filename
Is the name of a structured storage UNC file containing DTS packages. If server_name is also specified, then the contents of filename are overwritten with the DTS package retrieved from SQL Server.
/R repository_database_name
Is the name of the repository database containing DTS packages. If no name is specified, the default database name is used.
/!X
Retrieves the DTS package from SQL Server, and overwrites the contents of filename, without executing the package. If this option is not specified, then the DTS package is executed immediately.
/!D
Deletes the DTS package from SQL Server. The package is not executed. It is not possible to delete a specific DTS package from a structured storage file. The entire file needs to be overwritten using the /F and /S options.
/!Y
Displays the encrypted command used to execute the DTS package without executing it.
/!C
Copies the command used to execute the DTS package to the Microsoft Windows® clipboard. This option can also be used in conjunction with /!X and /!Y.
Remarks

Spaces between command switches and values are optional. Embedded spaces in values must be embedded in double-quotes.

If an option is specified multiple times, the last occurrence takes precedence.

To execute a DTS package saved as a COM-structured storage file, use:

dtsrun /Ffilename /Npackage_name /Mpackage_password

  

To execute a DTS package saved in the SQL Server msdb database, use:

dtsrun /Sserver_name /Uuser_nName /Ppassword /Npackage_name /Mpackage-password

  

To execute a DTS package saved in Repository, use:

dtsrun /Sserver_name /Uuser_nName /RRepository_nName /Ppassword /Npackage_name /Mpackage-password

  

See Also

Executing DTS Packages


(c) 1988-98 Microsoft Corporation. All Rights Reserved.