Thursday, 27 June 2013

Do Audit Trail by triggers in MS-SQL

I have written SQL dynamic script which will create tirggers in your database. you have to just mention table name.
if your audit log table column would different then do some customization in query as per your requirement.

columns of audit log table

 mode        -     Insert/Update  
 insertedon    -     Current date  
 tblname      -    Table Name       
 colname      -    Coulumn Name  
 id           -    Primary Key Of Table  
 oldval        -    Old Value before update  
 newval       -    New Value after Update or Insert  
 Ip          -    Ip Address of table  


Donwload Audit Trail txt

No comments:

Post a Comment