Click here to Skip to main content
12,359,751 members (64,484 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: SQL-server-2008R2
Hello,
I want to implement audit trail in sql server 2008 r2 in express edition. any one know how to implement the same.
Thanks a lot in advance.
Posted 26-Dec-12 18:58pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

As you are aware, SQL Server Audit can only be done on Enterprise and Data center editions of SQL Server 2008 R2.

http://msdn.microsoft.com/en-us/library/dd392015(SQL.100).aspx

However, the article mentioned above briefly mentions SQL Server Trace (SQL Profiler is the GUI). SQL Server Trace can be used to trace all batches that run on your server. This will give you a good degree of auditing, although not at the level that the SQL Server Audit provides. There have been articles on this:

http://www.sqlmag.com/article/auditing/get-compliant-with-sql-server-2005-audit-logging.aspx
http://www.sqlservercentral.com/articles/Administration/auditingwithsqlprofiler/1461/

And others as well. People used SQL Server Trace and Profiler for years before SQL Server Audit and doubtless many who cannot afford the more expensive versions of SQL Server will continue to do so.

Happy New Year ... Wish u good luck...Smile | :)
Regards,
Vijay
  Permalink  
Comments
Nirali R shah 27-Dec-12 1:55am
   
Thank you very much for your quick reply.. so can i implement Audit with the triggers...if so then how?

Wishing you Happy New Year :)
Nirali R shah 27-Dec-12 7:40am
   
Hello,
I want your help for SQL Server 2008 r2 Express to implement Audit, where it is done manually or is there any inbuilt functionality for the same..
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Yes, you can implement triggers.
To create a trigger, you just need to find out which sentences you want to audit and create a trigger after an insert, update or whatever event you want to audit.

Check the examples here:
http://msdn.microsoft.com/en-us/library/ms189799.aspx[^]

Optionally, there are third party tools that can help you to audit your SQL Server like the SQLApex Audit:

http://www.apexsql.com/sql_tools_audit.aspx[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100