Receiving SQL Server events from a CLR function

Posted by Pablo Lerner on Stack Overflow See other posts from Stack Overflow or by Pablo Lerner
Published on 2010-05-08T22:30:01Z Indexed on 2010/05/08 22:38 UTC
Read the original article Hit count: 217

Filed under:
|
|

I wrote a CLR class with several methods, which are linked as functions in a SQL Server 2005 database. When several of these functions are used in scope of one transaction or connection, I need another one to be automatically executed to clean up some stuff, at the time of transaction or connection close (either time is good for now, later I will decide which is best). I figure that receiving events from another new CLR functions can do, but I don't know how to achieve that.

Can anyone point me to information on modules, documents or whatever, that can help me understand how to receive transaction or connection closing events in a CLR class, or how to execute a particular function when these events occur?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about events