My solution to this problem was that design time values always pointed to the dev environment. Any developer opens up the package, it validates against that environment and all is well and good.
Running the packages outside of dev meant that they were run through SQL Agent. If you can exact that level of control, then it's a simple matter of creating your jobs to point to the correct configuration repository.
Physically implemented, I used a custom ssis catalog per environment (SYSDB) that held our configuration, logging framework + the standard logging table (sysdtslog90/sysssislog). Every package was required to have a variable User::Default_ConfigurationServer
and that variable was used as an expression on the Configuration Connection Manager's ConnectionString property. Sounds complex but it's not---
- Create a variable of type string
- Copy the value of the configuration
connection manager's connection string and paste that as the value
- Assign an expression back to the configuration connection manager's
ConnectionString property
Net effect in dev is that it does nothing but now you're positioned to make it work in other environments. My Agent's all look something like
DECLARE @serverName sysname
, @jobstep_command nvarchar(4000)
-- Lots of other stuff removed
SET @serverName = @@servername
SET @jobstep_command = N'/SQL "\MyPackage"' + '" /SERVER "' + @serverName + '" /CHECKPOINTING OFF /REPORTING E /SET "\Package.Variables[User::Default_ConfigurationServer].Properties[Value]";"\"Provider=SQLNCLI10;Data Source=' + @serverName + ';Initial Catalog=SYSDB;Integrated Security=SSPI;\""'
-- create the job, also removed
-- Create the job step
EXECUTE @return_code = msdb.dbo.sp_add_job
@job_name = @job_name
, @enabled = @job_enabled
, @description = @job_description
, @start_step_id = @job_start_step
, @category_name = @category_name
--, @category_id = @category
, @owner_login_name = @job_owner_login_name
, @notify_level_eventlog = @job_notify_level_eventlog
, @notify_level_email = @job_notify_level_email
, @notify_level_netsend = @job_notify_level_netsend
, @notify_level_page = @job_notify_level_page
, @notify_email_operator_name = @job_notify_email_operator_name
, @notify_netsend_operator_name = @job_notify_netsend_operator_name
, @notify_page_operator_name = @job_notify_page_operator_name
, @delete_level = @job_delete_level
, @job_id = @job_id OUTPUT
Now, regardless of where my job is created, it points that variable to the right location which in turns leads to the package discovering the correct repository and I have less work to do.