Monday, March 19, 2012

Creating SSIS Package Event Handlers

I would like to create an event handler that would catch any errors that result from a sys.<table> not existing. The package is designed to run on both SQL Server 2000 and SQL Server 2005 and when I query sys.<tables> there is an error when the query is run on SQL Server 2000. I just need a good starting point...I would like something that when the server isn't 2005 it just skips the server and doesn't fail the package and doesn't get counted towards the max error count. Thanks for any help.
-Kyle

Add an Execute SQL task that queries @.@.VERSION prior to the query that uses the sys.*. Then you can use precedence constraints based on the version value to determine whether the tasks execute.

Code Snippet

SELECT @.@.VERSION

No comments:

Post a Comment