Reputation: 937
I have created a SSIS Package. I want to use Variables for development purpose in my local. But, When I move this Package to QA, I want to make use of the XML Package Configuration file(.dtsConfig) so that it will use values specific to environment. I am using Indirect Configuration File by keeping the .dtsConfig File path in environment variable & also I turned on "Enable Package Configuration".
I generated the .dtsConfig file made necessary changes to it (for environment specific values). Copied the .dtsx & .dtsConfig file to different server. Created environment variable on the server with value having path of the .dtsConfig file. Called the SSIS package from a SQL job.
But,on server it's using the Variables value not values from the .dtsConfig file. While on local, it's using values from .dtsConfig file. I want the exact opposite behavior.
What am I missing here? Is there some other property for this behavior?
Note: Adding the .dtsconfig file path in "Configurations" tab of SQL job, uses values from the package config file. But I want to make use of Environment Variables for .dtsConfig file path
Upvotes: 3
Views: 7377
Reputation: 937
Environment variables are cached when a process starts, so adding a new variable is not visible until you restart the process, be it BIDS or SQL Agent or something else. [got from source on internet]
After restarting SQL Server, it started using indirect package configuration (.dtsConfig)file. But, it's not a feasible solution to restart DB server of all environments. So I preferred using SQL Job configuration. i.e. Adding the .dtsConfig file path in Job Configuration.
During development, I had to restart Visual Studio after creating environment variable. To confirm this behavior I followed following steps:
So, if we are using environment variable, Consuming program should be restarted after any change.
Upvotes: 1