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: Thursday, September 12, 2013 5:50 AM
Points: 47, Visits: 267
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: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
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

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1352261
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse