July 6, 2018 at 9:40 am
I have a SSIS package that has a SQL Server configuration named Configuration_1
The configuration filter has a value of DEV in the package.
For running the package via a SQL Server Agent job, I want to change
the filter value to PROD .
For the Job Step Properties for the job, on the Set values tab I entered:
\Package.Configurations[Configuration_1].Properties[ConfigurationFilter]
When I go to execute the job, it errors saying:
DTExec: Could not set \Package.Configurations[Configuration_1].Properties[ConfigurationFilter] value to PROD
can someone tell me the correct syntax to have the agent job change the configuration filter?
TIA,
Doug
July 6, 2018 at 11:30 am
It's not a question of syntax, you just can't change the ConfigurationFilter property of a configuration item at run time.
There are ways to change the values that are loaded, but not the list of properties and variables that are included in the configuration set.
You could use two packages, where one package is loaded and uses whatever logic you like to define package variables. Then it calls the main package that makes use of these variable values through parent package configuration.
You could use commandline options in the SQL Agent job step to load different configuration files. One package definition, but multiple jobs can run it with different configurations.
Newer versions of SSIS allow you to use project configuration and save separate DEV and PROD sets of environment values, then again the job step can specify which set to use for a particular execution.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply