Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


On Error () Logging by Using Event Handlers


On Error () Logging by Using Event Handlers

Author
Message
mail.arun2005
mail.arun2005
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 176
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
Jason P. Burnett
Jason P. Burnett
Right there with Babe
Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)

Group: General Forum Members
Points: 747 Visits: 1432
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

Regards,

Jason P. Burnett
Senior DBA
mail.arun2005
mail.arun2005
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 176
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.
Jason P. Burnett
Jason P. Burnett
Right there with Babe
Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)Right there with Babe (747 reputation)

Group: General Forum Members
Points: 747 Visits: 1432
Thanks for the details. Greatly appreciated!

Regards,

Jason P. Burnett
Senior DBA
Misha_SQL
Misha_SQL
SSChasing Mays
SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)SSChasing Mays (610 reputation)

Group: General Forum Members
Points: 610 Visits: 986
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!



gchornenkyy
gchornenkyy
SSC-Addicted
SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)SSC-Addicted (419 reputation)

Group: General Forum Members
Points: 419 Visits: 375
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
SJ-727436
SJ-727436
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 96
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!
mail.arun2005
mail.arun2005
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 176
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-715174688879
After 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.com
Thanks
Arun
New Commer
New Commer
Old Hand
Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)Old Hand (332 reputation)

Group: General Forum Members
Points: 332 Visits: 467
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 [<<Database Name>>].[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 ?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search