August 30, 2012 at 5:53 am
I need to trace the user log against my database tables.
Most of the tables have the customer’s sensitive data.
I need save every action (select , insert, update and delete) against those tables information with user log to AuditLog table.
For example,
If a user viewed or insert or update or delete the SocialSecurityNumber from customer table,
I need to enter the above actions with user information to AuditLog table.
Can anyone help me on this...
Thanks in advance,
Nithi
August 30, 2012 at 8:23 am
You can capture DML operations (i.e. INSERT, UPDATE and DELETE) using TRIGGER. SELECT operations are a bit trickier. Are you using stored procedures for all data access? If so you can add rows to your AuditLog table whenever a proc that selects data is called. If you are not using stored procedures then you will need to use a Server-side Trace or Log Reader to capture SELECT operations since there is no trigger mechanism available from T-SQL that you can code against to respond to those.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply