SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
kmmcleod
kmmcleod
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 17
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!
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65068 Visits: 13298
Why don't you use the /config switch 2008? Or you trying to overrule configs already specified in the package?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
kmmcleod
kmmcleod
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 17
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.
Mike John
Mike John
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3406 Visits: 5984
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



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search