Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

syntax for using /SET for SSIS config file in SQL 2008? Expand / Collapse
Author
Message
Posted Sunday, July 7, 2013 10:06 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 22, 2013 12:50 PM
Points: 5, 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!
Post #1470977
Posted Sunday, July 7, 2013 3:25 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:40 AM
Points: 13,561, Visits: 10,436
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470994
Posted Monday, July 8, 2013 6:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, July 22, 2013 12:50 PM
Points: 5, 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.
Post #1471151
Posted Monday, July 8, 2013 9:43 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 9:52 AM
Points: 2,663, Visits: 5,812
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




Post #1471253
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse