Re: Audit logging an adp
- From: Steve Troxell <steve_troxell@xxxxxxxxxxxxxxxxx>
- Date: Mon, 04 Sep 2006 17:30:55 -0400
Merlin wrote:
Some people may be tempted to suggest using SQL Server triggers, so I'll jump in early and say they won't help me for these reasons:
* All connections to the SQL Server are done through a single account, so I can't get the user ID of the person making the change; and
If the application can call SET CONTEXT_INFO after opening a database connection (for example calling a stored procedure which calls SET CONTEXT_INFO), then you can pass in any username you like (or any other piece of data up to 128 bytes total) and it will remain local to the database connection. The triggers can read this data and store whatever value you pass in as the user ID.
* Most of the tables contain NText and Text fields that will need to be auditted, and the triggers don't let you see the value of fields of that type
INSTEAD OF triggers will.
I sell a SQL Server audit product which automatically creates audit triggers for you, including the SET CONTEXT_INFO stuff. It audits TEXT/NTEXT/IMAGE fields but only to the degree as described previously by David (it captures the changed value...you have to look at the previous audit to get the "before" value). Implementing an INSTEAD OF trigger option is on the todo list.
Steve Troxell
http://www.krell-software.com/omniaudit
.
- Prev by Date: Re: Open store procedure from VBA
- Next by Date: Re: Crosstab REPORT, not query
- Previous by thread: Re: Audit logging an adp
- Next by thread: Re: Audit logging an adp
- Index(es):
Relevant Pages
|