.dtsConfig ConfiguredValue contains environment variable?

is this possible

<Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

<ConfiguredValue>%enviroment variable%</ConfiguredValue>

</Configuration>

it would be really useful. it looks like the .dtsconfig file needs to be maintained on each install independently. This makes maintenance a nightmare. it would be a lot nicer if the .dtsconfig files were more like templates rather than hard coded values to specific system resources.



Answer this question

.dtsConfig ConfiguredValue contains environment variable?

  • MosIdiot

    You have to maintain the environment specific settings somewhere, and per environment, otherwise they would not be much use would they. If you don't like config files, then use environment variables by all means.

    Perhaps the template concept you want is really the number of configurations you have. Do not use one configuiration (file) for all settings. It is better to have each setting or only closely related settings per configuration file.

    There seems little point to reading an environment variable in with the script task, when you can assign the environment variable value to a variable using an "Environment variable" configuration in the first place.



  • Daniel Pravat

    To use an environment variable as the configuration value, select the configuration type "Environment Variable" as opposed to "XML Configuration File".

    You would normally maintain separate copies of XML configuration files per environment.



  • Giovanni Mastichio

    ya I get that whole part about selecting configuration type and maintaining separate copies of the xml config file per environment.

    My point is that sucks. it makes configurations no so useful. I agree it's nice to have a place to put config stuff but if it has to be maintained for each environment. as you change your package you have to manually change and maintain each config for each environment.

    It would be nice if the configuration stuff also let you use environment variables that way it’s more like a template that defines what global stuff your package required. Instead we are given a tedious error prone manually maintained hack.

    at some point the rubber and road meet. that place in my opinion is an environment variable.

    I can still do what I want by creating a variable and then reading the environment variable via a script task and then using it via an expression yada yada. I was just hoping there was some secret syntax for doing what I wanted. I’m surprised how many times there are undocumented secret features.


  • S Eisenberg

    You do not understand what I’m getting at… and something else; suppose you don’t have access to uat, prod fix, or production environments, just development. And even worse the person who rolls out your code changes in a different part of the country. So you can’t just stand behind them telling them what to change at rollout time. And your rollouts happen on Saturday 1:00 am outside your COW(critical online window) and your wife is really happy about getting phone calls at 1:00 am because it wakes her and the kids up. The guy doing the rollout is not a developer he does not know what an xml document is. You have to write up instructions for the rollout and hopeful they get it. But you tested in uat first so you maybe caught the type-o’s.

    Think about it this way.

    Config file(what we have today) version 1

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>c:\path</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Config file(what we have today) version 2

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>d:\path</ConfiguredValue>

    </Configuration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName1].Properties[Value]" ValueType="String">

    <ConfiguredValue>c:\path</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Config file(what we have today) version 3

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>d:\path\someextra path stuff</ConfiguredValue>

    </Configuration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName1].Properties[Value]" ValueType="String">

    <ConfiguredValue>\\servername\c$\path</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Config file(my config file) version 1

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>@environment var 1</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Config file(my config file ) version 2

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>@environment var 1</ConfiguredValue>

    </Configuration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName1].Properties[Value]" ValueType="String">

    <ConfiguredValue>@environment var 2</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Config file(my config file ) version 3

    < xml version="1.0" >

    <DTSConfiguration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName].Properties[Value]" ValueType="String">

    <ConfiguredValue>@environment var 1</ConfiguredValue>

    </Configuration>

    <Configuration ConfiguredType="Property" Path="\Package.Variables[User::varFolderName1].Properties[Value]" ValueType="String">

    <ConfiguredValue>@environment var 2</ConfiguredValue>

    </Configuration>

    </DTSConfiguration>

    Do you see what I mean about more of a template approach I’m trying to minimize the thing that needs to be changed. It’s easier to change the environment variable than try to change the config file. (in my opinion) the config file is consistent across the environments. Only the environment variables need to be set to the specific values for the environments. The fewer things that need to be changed and maintained the better off we are

    The point to reading in environment variables with the script task is it gives me the template in my package but it’s more hidden than in the config file.


  • .dtsConfig ConfiguredValue contains environment variable?