Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Column level audit ... Expand / Collapse
Author
Message
Posted Thursday, August 30, 2012 5:53 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:50 AM
Points: 47, Visits: 284
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
Post #1352126
Posted Thursday, August 30, 2012 8:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 7:27 PM
Points: 7,127, Visits: 12,657
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
Post #1352261
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse