syntax for using /SET for SSIS config file in SQL 2008?

  • I used to use /CONF to represent an XML config file running SSIS packages via DTExec with SQL 2005. With the behavior change of SQL 2008 (some variables are no longer getting the CONFIG file value) I am attempting to use the /SET option to pull in the XML config file. Has anyone else done this? With the following code:

    set job=Run_DepartmentJob

    set dtsxName="DepartmentJob"

    set dtexecLocation="d:\DTExec.exe"

    set dtsxPath="X:\SIS\DepartmentJob.dtsx"

    set dtsxConfigPath="X:\SSIS\Config_files\DepartmentJob.dtsConfig"

    call %dtexecLocation% /F %dtsxPath% /SET "\Package.Configurations[Config].Properties[ConfigurationString]";%dtsxConfigPath% /CHECKPOINTING OFF >> %pathout%%job%.OUT

    I am getting the following error:

    DTExec: Could not set \Package.Configurations[Config].Properties[ConfigurationString] value to X:\SSIS\Config_files\DepartmentJob.dtsConfig.

    Is the syntax off?

    I LIKED the ability to use a CONFIG file in SQL 2005 to set environment specific values for my SSIS packages. That option made deploying to different environments very easy. I don't understand why Microsoft would change the behavior of this option. Are there any other alternatives that people are now using to access XML Config files when running SQL 2008 SSIS packages with DTExec?

    Thanks!

  • Why don't you use the /config switch 2008? Or you trying to overrule configs already specified in the package?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • For some reason the /config switch is no longer working for 2 SSIS packages. Some config values are reverting back to values from config file in test environment. Seeing the difference in behavior from SQL 2005 to SQL 2008 I thought maybe I now needed to use /SET instead of /CONF when running SSIS in SQL 2008.

  • Just to say you are not alone in finding the current behaviour odd. There must have been some reason for it, but I just cannot understand what benefit there is in reloading the settings from the config file if they have been overwritten on the command line.

    A horrible workaround we have found is to specify the /CONF parameter and ensure the ORIGINAL config file (ie the one referenced when testing) does not actually exist on the real server.

    Alternatively setting a variable via /SET can be done something like this:

    dtexec /FILE "C:\xxx\whatever_package.dtsx" /CHECKPOINTING OFF /SET "\Package.Variables[Connection_String].Value";"\"Data Source=XXXXSERVERXXX ;Integrated Security=SSPI;Initial Catalog=XXXDBNAMEXXX;Provider=SQLNCLI10.1;Persist Security Info=True;Application Name=myssispackage;\""

    That was extracted from running a dts package from with a SQL Server Agent job, with a few names changed for things like server_name, db name etc. Offhand I cannot recall what all the escaped " with \ was for, but I can assure you the original job runs fine! The aim of the variable is to hold a full connection string, so the SSIS package uses whatever server and database are defined in that connection string.

    To avoid the config file overwriting the variable, ensure the variable (in the example it was called Connection_String) is NOT in the config file.

    Hope that helps.

    Mike John

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply