How to pass variable as a parameter in Execute SQL Task SSIS?

In your Execute SQL Task, make sure SQLSourceType is set to Direct Input, then your SQL Statement is the name of the stored proc, with questionmarks for each paramter of the proc, like so:

Execute SQL Task Editor - General

Click the parameter mapping in the left column and add each paramter from your stored proc and map it to your SSIS variable:

Execute SQL Task Editor - Parameter Mapping

Now when this task runs it will pass the SSIS variables to the stored proc.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)