Issue with copied task
I have created a template SSIS 2008 package. In it are several control flow template tasks. These task have been designed to write to an audit table by including event handlers which insert to a table on the OnPreExecute event and then update the table on the OnPostExecute event. The template tasks are disabled and the idea is users can copy these tasks as a starting point, enable them and then add their own logic. The issue I have is if I copy, say a data flow task, twice and run these 2 tasks in parallel the information written to the audit table is incorrect. The information for the DFT which runs first is written to the audit table for both tasks. In the OnPreExecute event handler I have a script task "Set Audit Variables" which sets the values of various package level variables (e.g source table, destination table) and builds up a variable (varInsertAuditTaskSQL) which holds the SQL which will insert the information into the audit table. After the script task there is a SQL task which executes SQL in varInsertAuditTaskSQL. I have found that if I recreate the script task "Set Audit Variables" (i.e. copy the code, add a new script task, paste in the code and remove the original task) then the information is written to the audit table correctly. This is a workaround and something I wouldn't want our users to have to do. Any idea what could be causing this behaviour?
October 14th, 2011 10:38am

Possible that the GUID of the copied task is the same as its source? Not sure. Try downloading and installing BIDS Helper (free utility) for your version of Visual Studio (2005 or 2008). This is a wonderful tool and I wouldn't do BI dev work without it. After that, right-click on a package and select "Rest GUIDs".Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
October 14th, 2011 10:47am

Thanks for the reply. The GUID of the copied task is different to the source. I have BIDS Helper and have tried resetting GUIDs without any luck.
October 14th, 2011 11:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics