ssis

SSIS Execute SQL Task SQL Command Issue


I have the following insert statement in my execute sql task in SSIS:

INSERT INTO dbo.SSISLogTest 
   (NodeID, BusinessDate, StartDate, StopDate, StepName, RecordCount, Message, Status, UserID)
VALUES        (?,?,?,?,?,?,?,?,?)

When I run it within the task providing parameters it executes fine and inserts a record in the table.

When I run the package, this step fails with the following error:

"[Execute SQL Task] Error: Executing the query "INSERT INTO dbo.SSISLogTest ..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. "


Solution

  • Different connection providers require different syntax - all of the following must be set correctly:

    Please see an OLEDB example in the screenshots below and refer to Working with Parameters and Return Codes in the Execute SQL Task for details.

    enter image description here

    Execute SQL Task - General

    enter image description here