Friday, February 24, 2012

DTEXEC /CONFIGFILE Option

I have the following command which uses the /CONFIGFILE option:

master.dbo.xp_cmdshell 'dtexec /DTS "\File System\Packages\MyPackages\MyPackage" /SERVER "MYSERVER" /CONFIGFILE "C:\Program Files\Microsoft SQL Server\90\DTS\Packages\MyPackages\customersite.dtsconfig" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V '

When the package runs, one of the first things it reports is that the configuration file, 'customersite.dtsconfig' cannot be found:

...

Description: The package is attempting to configure from the XML file "CustomerSite.dtsConfig".

...

Description: The configuration file "CustomerSite.dtsConfig" cannot be found. Check the directory and file name.

...

Description: Failed to load at least one of the configuration entries for the package. Check configurations entries and previous warnings to see descriptions of which configuration failed.

The package hapilly executes (and, somehow does grab the appropriate values from config (in this case, it is the SQL Login passwords).

Can anyone provide some insight into this or is this a bug that should be ignored?

I strongly suggest that you use SQL Server Agent stored proceedures instead of xp_cmdshell.

It's easier and more secure.

No comments:

Post a Comment