SQLTeam.com | Weblogs | Forums

Help needed in running SSIS package from TSQL


#1

SQL 2016
I have logged on as an Administrator.
after looking through several threads I arrived at this code
I am no expert by a country mile, so need all the help I can get

DECLARE @executionID BIGINT
DECLARE @var integer = 2618

EXEC [SSISDB].[catalog].[create_execution]
@folder_name=N'ClientUser',
@project_name=N'ClientUserAdd',
@package_name=N'ClientUserAdd.dtsx',
@reference_id=NULL,
@use32bitruntime=FALSE,
@execution_id=@executionID OUTPUT

EXEC [catalog].[set_execution_parameter_value]
@executionID,
@object_type=30,
@parameter_name=N'USERID',
@parameter_value=@var

EXEC [catalog].[start_execution] @executionID

SELECT [STATUS]
FROM [SSISDB].[internal].[operations]
WHERE operation_id = @executionID

however when executing it I get the following error
Msg 27176, Level 16, State 1, Procedure set_execution_parameter_value, Line 149 [Batch Start Line 0]
The parameter 'USERID' does not exist or you do not have sufficient permissions.

On the SQL server, I can see the project and package. I have double checked by going into the project and configure - the parameter is there


#2

Managed to resolve this with this link

https://docs.microsoft.com/en-gb/sql/integration-services/packages/deploy-integration-services-ssis-projects-and-packages?view=sql-server-2017