问题
I found the catalog.object_parameters view that displays the parameters, but short of creating Environments, which I'd rather avoid, I'd like to find a way to replicate the "Configure" dialog box at the Project level with Stored Procedure calls. I can't seem to find a "catalog" stored procedure that fits the bill.
Has anyone cracked this nut? How do I set a Project-level Parameter at deployment (not execution) time?
回答1:
I was seeking a quicker way to do it my self
In brief I went and manual made changes to all the connection managers and project parameters in the Configure menu of the project deployed on the Integrations Services Catalog, before saving I clicked the Script to button and it created a series of insert update scripts that just look like its updating the old ssis_configs table. I then wrote a power shell script that re configure the parameter values i.e. for each environment etc. in my case my dev projects were looking at a certain schema and when in prod it looks elsewhere and in dev I limit the number of executables but in prod I let em have it. this is easily set as variables in the powershell that then creates the change in the set configurations SQL script (SqlCMD) script will work nicely too
simplistically you can use the stored proc called
[SSIS].[catalog].[set_object_parameter_value]
You'll need to know the parameters
@object_type = 20,
@parameter_name = N'your parameter by name',
@object_name = N'the ssis project name for a project param package for other',
@folder_name = N'the folder the project is in SSISDB',
@project_name = N'project name again'
@value_type = V -- not sure what this is for,
@parameter_value = N'YOUR NEW VALUE!!'
回答2:
Are you looking to set a project level parameter. Hope this helps you.

- you can add parameters on the left pane.
Again, On run time, we can pass value to this parameters with SSIS stored proc 'catalog.set_object_parameter_value'
If you right click an SSIS package which is deployed in SSIS catalog, you have an option to 'Configure...'. In the Parameter tab, you can overwrite default values too.
回答3:
For Project variables:
EX: USE SSISDB GO DECLARE @var sql_variant = N'Data source= Data base connection'
EXEC [SSISDB].[catalog].[set_object_parameter_value] @object_type=20, @parameter_name=N'ParameterName', @project_name=N'FolderName', @folder_name=N'FolderName', @value_type=V, @parameter_value=@var GO
For Package Variables:
Ex: DECLARE @var sql_variant = N'D:\FileName.TXT'
EXEC [SSISDB].[catalog].[set_object_parameter_value] @object_type=30, @parameter_name=N'ParameterName' , @object_name=N'packageName', @folder_name=N'FolderName' , @project_name=N'FolderName', @value_type=V, @parameter_value=@var GO
回答4:
To answer the question contained in the answer, the @Value_Type parameter can be either V for value R for relative
As part of the setup for processing using Environments, the Project Parameters need to be set to Relative and assigned a Value of the name of the Environment Variable that will supply its value. It is fairly obvious that the Environment Variable name should be the same as the Project Parameter name IMO.
Environments are the mechanism by which you should be setting up your Execution Parameters, it works out much simpler in Production. (I will write a proper post on this one day, I hope.)
回答5:
These resources would be worth,
Properties Using Parameters–SSIS 2012
SSIS Project Parameters
create project parameters
来源:https://stackoverflow.com/questions/24310991/how-can-i-automate-setting-ssis-project-parameters-in-ssis-2012