Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Script Library
 Environment Variables in ssis

Author  Topic 

Starting Member

49 Posts

Posted - 2013-06-06 : 03:22:31
what is uses of Environment variable in ssis congigaration .Give some example with step by step in ssis.

please help me


Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-06 : 03:40:48

Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-06 : 04:10:04
One of common scenarios where we've used environment variables is when we want to use indirect configuration for packages.
The package will have lots of configuration items (Connection managers, variables etc) which will make use of a XML configuration file to store values. But this still has issue of file path being static which would require XML config file to be present in same path as in local machine when you deploy package to server.
To deal with this, what we do is to store the XML file path in environment variable and then in configuration properties map the variable to indicate this. The various environment servers(dev,qa,prod) will have environment variable present with correct path value for the XML config file.

same is documented here

SQL Server MVP
Go to Top of Page

Rasta Pickles
Posting Yak Master

174 Posts

Posted - 2013-06-08 : 13:29:03
To add to previous posts, environment variables can help you to overcome such superb Microsoft error messages as:

You cannot perform operation Remove on an object in state Existing. (Microsoft.SqlServer.Smo)

Yes, I've copied and pasted that error message from SSMS 2008R2.

I kid you not.
Go to Top of Page

- Advertisement -