|
|
Question : SQL Server 2005 CLR Trigger - Audit Table Requires Additional Information
|
|
I have a generic CLR audit trigger assigned to my database tables for insert, update and delete. It works fine and tracks the changes just as I need but I need to add additional information to the audit table when recording these events. I need to be able to track the changes by a session id that is assigned to the user when working in the web application. This session id tracks the changes a user performs during their daily processes. Since I can't pass in parameters into a Trigger and I have not seen where this has changed with the addition of the CLR does anyone have an idea on how to make this addtional information available when the trigger is executing? I thought about including it with the actual data in the tables but that is not an option at this point.
Thanks,
Matt
|
Answer : SQL Server 2005 CLR Trigger - Audit Table Requires Additional Information
|
|
No. What if you have multiple users inserting simultaneously? Which ID/user do you use in the trigger? Without key information on the standard table you have no way of identifying which sessionID to use.
|
|
|
|