I have an SSIS package that has an Execute SQL Task where I have a INSERT Statement that inserts log data to this ssis tracking table in smss that tracks the time of execution. Everytime I try to execute the task I get this error: [Execute SQL Task] Error: Executing the query "INSERT INTO dbo.SSIS_Logging_Details (Execution_In..." failed with the following error: "Must declare the scalar variable "@ExecGUID".". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
1.This is the Statement I have in the SQLStatement field in the Execute SQL task:
INSERT INTO dbo.SSIS_Logging_Details
(Execution_Instance_GUID, Package_Name, Execution_Date)
VALUES (@ExecGUID, @PackageName, GetDate())
2.I have the these parameters in the Parameter Mapping tab of the Execute SQL task: enter image description here
3.For the SQL table in smss:tableSSIS_Logging-Details here are the fields:
Execution_Instance_GUID nchar(100) NULL
Package_Name nchar(100) NULL
Execution_Date datetime NULL
4.And for the 'Configure SSIS Logs: Package' I have the package in there with the provider type being SSIS Log Provider for SQL Server (but it keeps switching to SQL Server Profiler for some reason whenever I open it..) enter image description here