Tracking User access to a database on SQL 2008R2 Standard

  • Hi

    I am new to SQL 2008R2 Standard edition and I have been requested to track users/l ogins trying to access a specific database directly? Access should be configurable for various activities such as read/only, write and update, execution of sp, etc.

    Since I don't have the bells and whistles version is there a simple script that utilizes the 2008 enhancements compared to 2000 and 2005 ?

    System Details are------------------------------------------

    Microsoft SQL Server Management Studio10.50.2550.0

    Operating System6.1.7601

    -----------------------------------------------------------

    Thanks in Advance

    adelavigne

  • On SQL Server 2008R2 Standard Edition (SP2 I hope), you have only 1 ½ options:

    - A custom SQL Trace session (which you can prepare using Profiler) and then have to start automatically with server start by placing an auto-start procedure in master-db

    - A custom Extended Events session

    - the latter has less overhead, but many events are not available in 2008 yet – and some never will be because they belong to the Audit feature, which in SQL 2008 is enterprise only

    You should get an exact list for what you really have to capture & log, but if you do not want to mix technologies, you will have to use SQLTrace alone.

    Andreas

    ---------------------------------------------------
    MVP SQL Server
    Microsoft Certified Master SQL Server 2008
    Microsoft Certified Solutions Master Data Platform, SQL Server 2012
    www.insidesql.org/blogs/andreaswolter
    www.andreas-wolter.com

  • I don't have much to add to Andreas's response, but I note that your spec is somewhat vague. It would help to know more about this database, and why it has to be audited.

    If all access is by stored procedures, you can put the auditing since the stored procedures. Furthe more write access can be audited by triggers. But direct SELECT statements can only be audited by trace or SQL Server Audit. And the latter, as Andreas pointed out, is only in Enterprise Edition.

    I also like to remark that when you posted the "system details", you posted the details about Managerment Studio on your workstation, which says little about the server. To that end, you should post the output of "SELECT @@eversion".

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply