1
votes

When I am executing a Procedure with output parameters using SQL Task, I am getting the below mentioned error. There is no problem in db connection, number of passing params, sequence of params and data type.

Command for execution EXEC [dbo].[spArchiveTablesCleanup] ? OUTPUT, ? OUTPUT, ? OUTPUT

Error: [Execute SQL Task] Error: Executing the query "EXEC [dbo].[spArchiveTablesCleanup] ? OUTPUT, ? OU..." failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

SSIS Parameter Mapping: enter image description here

SSIS Variable Declaration: enter image description here

SQL Server procedure params definition:   enter image description here

2

2 Answers

0
votes

Remove 'OUTPUT' from your EXEC statement. I don't believe you actually need to have that there.

https://www.sqlshack.com/execute-sql-tasks-in-ssis-output-parameters-vs-result-sets/

0
votes

I have changed the Output parameter Data Type from NUMERIC to LONG, it worked perfectly.

enter image description here