By tag: trigger
0
kicks
Creating a generic CLR audit trigger
There’s an interesting article at SqlJunkies about how to create a generic CLR audit trigger. But there is just one small problem with this trigger code. The PerformedBy column of the Audit table in the sample code is set to the UserID of the connection string which in most applications would be the...
0
kicks
Super easy SQL Server 2005 Database Schema change auditing
Here's a very simple way to make use of xml type in SQL Server 2005: audit all the object/schema changes to the database with a simple database-level trigger. It's like a poor man's source control for schema changes. But also, it could come in very handy for forensic purposes when diagnosing post-r...
0
kicks
SQL Server: How to audit rollback-ed data in a trigger?
The most popular method of auditing data is with an AFTER DELETE, INSERT, UPDATE trigger.
But what happens if you have a Rollback statement in your trigger if some condition is met?
<br><br>
More ><a href="http://weblogs.sqlteam.com/mladenp/archive/2007/04/13/60174.aspx&q...
0
kicks
Using a trigger to perform mass-update-safe, specific-field calculatio
You’ve got a table which contains some information and you want to perform calculations based on this information and store them in the same table or in another table.
The calculations must always be up-to-date.
The calculations are performed via a complex User Defined Function which accepts t...
0
kicks
Entity Life-Cycle in NHibernate Based Application
What it takes to implement good entity life-cycle in web NHibernate-based application