Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I would like to know if there is a table where accesses to tables are saved, per user or per system.

I'm using both SQL Server 2005 and 2008.

share|improve this question

migrated from stackoverflow.com Jun 12 '13 at 16:36

This question came from our site for professional and enthusiast programmers.

    
You mean like an audit log for all select/update/insert/delete/...? –  Joachim Isaksson Jun 12 '13 at 8:35
    
Yes, that's what I'm trying to find. And if there is anything per user. –  Radu Gheorghiu Jun 12 '13 at 8:35
    
Do you want to have permission information for all users that have access to your sql server ? –  Kin Jun 12 '13 at 16:43

3 Answers 3

The closest match to what you're looking for seems to be the SQL Server Audit feature, which was added in SQL Server 2008 as a replacement/successor for SQL Trace.

I recommend following the link to read up on it, since its setup/use is too big a topic to describe here in any meaningful way.

share|improve this answer
    
Thank you for your suggestions. –  Radu Gheorghiu Jun 12 '13 at 8:44
    
SQL Server Audit is availabe in the Enterprise Edition of SQL Server 2008 (and thus Developer and Enterprise Evaluation versions) and in the Standard Edition and higher of SQL Server 2012. –  Greenstone Walker Jun 12 '13 at 22:54

Auditing insert, update, delete, and merge operations can also be done using DML triggers.

share|improve this answer

Besides SQL Server Audit, there are some alternatives.

  1. You can open SQL server Profiler to trace, but it will affect system performance.
  2. Use 3rd party tool (e.g Quest LogReader) to read transaction log files.
share|improve this answer
    
No offense, but Profiler is a very bad idea for this. And I'm not sure what SELECT activity you expect to find in the transaction log... –  Aaron Bertrand Jun 12 '13 at 18:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.