﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Arun Mallick  / On Error () Logging by Using Event Handlers / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 05:04:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Hi Arun,Though its been few years i guess you might see this post.I tried using your solution for catching the error log in SQL 2008 R2. But the thing is, the package after its run displaying the Execute SQL task's color to be in RED. also with the following error message,------------------------------------------------------------------------------------------------------[Execute SQL Task] Error: Executing the query "INSERT INTO [&amp;lt;&amp;lt;Database Name&amp;gt;&amp;gt;].[dbo].[ErrorLog]([Packa..." failed with the following error: "Incorrect syntax near 'PK__csod_dat__72399DD10CBAE877'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.-------------------------------------------------------------------------------------------------------can you please help me here ?</description><pubDate>Mon, 03 Sep 2012 01:25:55 GMT</pubDate><dc:creator>New Commer</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Dear Developer,It seems you are trying to run individual tasks in control flow instead of whole package. In that case, ssis will not execute the Event handler section. Try running the whole package.I have gone through your ticket http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/e7fbe7e8-331f-49d5-88d3-715174688879After having a look on it, I can suggest you to mail me your package sample to me. I want to check it by myself about the error.My mail id:	mail.arun2005@gmail.comThanksArun</description><pubDate>Wed, 26 Aug 2009 20:03:53 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Hi,I am new to SSIS and followed the steps in this article as it is to create the error handler. If I execute the error handler SQL task manually it works fine and inserts into the DB but when the SSIS job fails it doesn't invoke the Error Handler at all. I have checked the DisableEventHandler property and it is set to False.I have also tried to use some help from the ticket http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/e7fbe7e8-331f-49d5-88d3-715174688879 but that didn't help either.Can someone please guide me in the right direction. I am trying to resolve it for 2 days now.Thanks!</description><pubDate>Wed, 26 Aug 2009 14:12:10 GMT</pubDate><dc:creator>SJ-727436</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Actually I am using Error handler to catch the error, collect all possible error description and send email with this information to operation support team</description><pubDate>Tue, 14 Jul 2009 07:54:13 GMT</pubDate><dc:creator>gchornenkyy</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>I have been using SSIS for a while, but haven't tapped into the power of even handling yet.  This is a great and useful introduction!</description><pubDate>Fri, 03 Jul 2009 11:51:28 GMT</pubDate><dc:creator>mishaluba</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Thanks for the details.  Greatly appreciated!</description><pubDate>Wed, 01 Jul 2009 09:36:52 GMT</pubDate><dc:creator>Jason P. Burnett</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Obviously, there is a reason for using PackageLogID as a user defined variable for tracking the execution of the package. Below is the list:•	It’s datatype is Int, so easy for calculation and analysis.•	Its size is less (datatype size), obviously good then using GUID.•	Can be sorted easily and is meaningful for the user (for easy understanding and detecting than GUID)Thanks for your comment.</description><pubDate>Wed, 01 Jul 2009 09:00:24 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>I have implemented something very similar to this however; instead of creating the PackageLogID as a user variable I am just using the system variable "ExecutionInstanceGUID".  I am curious though, did you choose to create a user variable for a particular reason?  One reason I could see is so that you could deal with an int value insead of a GUID but did you have other reasoning?Regards,Jason</description><pubDate>Wed, 01 Jul 2009 08:51:14 GMT</pubDate><dc:creator>Jason P. Burnett</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Yah it’s possible, I will try to find out some direct ways to do it. But for the time being, you can use one custom task to keep track of the currently executing container in a variable and can add that variable in the logging task.Thank You</description><pubDate>Sun, 28 Jun 2009 02:57:03 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Is it possible to add Cointainer Name along with Package Name &amp; Task Name. I think its little bit tircky</description><pubDate>Sun, 28 Jun 2009 02:31:50 GMT</pubDate><dc:creator>Niraj Kotecha</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>The column named “[PrcocedureName]” can be used to detect the procedure that causes the particular error. But I didn’t implement it in the methodology; the user can implement it in case if they are using some procedures in the ETL process. The details about implementing the same will be posted in my next article. Thank you</description><pubDate>Sun, 28 Jun 2009 01:37:56 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Just a quick question... I don't see where the column called "PrcocedureName" in the error log table is either described or used in the article.  Is it just an unused, mispelled artifact?Other than that, pretty cool article on simple error logging.</description><pubDate>Sat, 27 Jun 2009 21:12:27 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Hello Arun, brilliant! you're 100% correct. I just had to get up to speed on creating user variables. Thanks much Arun! You helped me learn something today!</description><pubDate>Fri, 26 Jun 2009 13:04:30 GMT</pubDate><dc:creator>cwcridindirty</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Hi… I checked the Expression thoroughly and it is working perfectly.Please check the user variable, may be u didn’t created the user variable named @[User::PackageLogID].If u have created the above variable perfectly, then please send me the detail of the error message that u got.Thank u</description><pubDate>Fri, 26 Jun 2009 11:49:48 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Hi Arun, Following your steps exactly as provided doesn't work. The Expressions Editor Query produces a cannot be parsed error message.</description><pubDate>Fri, 26 Jun 2009 11:33:28 GMT</pubDate><dc:creator>cwcridindirty</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>It gives u more customization on logging mechanism. Here I mentioned a simple example, u can use ur own ideas for a more complex logging.Thanks for ur comments</description><pubDate>Fri, 26 Jun 2009 11:13:27 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Is there a particular reason you don't use the built-in logging?</description><pubDate>Fri, 26 Jun 2009 10:58:37 GMT</pubDate><dc:creator>loydjerry</dc:creator></item><item><title>RE: On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Nice article and a good companion to Jamie Thompsons blog at conchango:[url=http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx]http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx[/url]I see you followed the same development path as I had - generalise the error logging and then the same principle can be applied to all SSIS packages in production. This leaves you with a consistant process log table which can be used for system reporting. Handy when you want to run a quick report in the morning to check on the status of all the overnight jobs :-)</description><pubDate>Fri, 26 Jun 2009 03:00:55 GMT</pubDate><dc:creator>Samuel Vella</dc:creator></item><item><title>On Error () Logging by Using Event Handlers</title><link>http://www.sqlservercentral.com/Forums/Topic738577-1480-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/SQL+Server/66387/"&gt;On Error () Logging by Using Event Handlers&lt;/A&gt;[/B]</description><pubDate>Fri, 19 Jun 2009 12:56:06 GMT</pubDate><dc:creator>mail.arun2005</dc:creator></item></channel></rss>