SQL Clone
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
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 176
Comments posted to this topic are about the item On Error () Logging by Using Event Handlers
Samuel Vella
Samuel Vella
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2031 Visits: 2144
Nice article and a good companion to Jamie Thompsons blog at conchango:
http://blogs.conchango.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx

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 :-)
loydjerry
loydjerry
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 12
Is there a particular reason you don't use the built-in logging?
mail.arun2005
mail.arun2005
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 176
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
cwcridindirty
cwcridindirty
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 16
Hi Arun, Following your steps exactly as provided doesn't work. The Expressions Editor Query produces a cannot be parsed error message.
mail.arun2005
mail.arun2005
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 176
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:TongueackageLogID].
If u have created the above variable perfectly, then please send me the detail of the error message that u got.

Thank u
cwcridindirty
cwcridindirty
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 16
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!
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216600 Visits: 41986
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.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
mail.arun2005
mail.arun2005
Valued Member
Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)Valued Member (53 reputation)

Group: General Forum Members
Points: 53 Visits: 176
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
Niraj Kotecha
Niraj Kotecha
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 248
Is it possible to add Cointainer Name along with Package Name & Task Name. I think its little bit tircky
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