Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Tracking User access to a database on SQL 2008R2 Standard Expand / Collapse
Posted Monday, September 2, 2013 8:00 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 15, 2013 7:08 PM
Points: 1, Visits: 14

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 Studio 10.50.2550.0
Operating System 6.1.7601

Thanks in Advance
Post #1490727
Posted Tuesday, September 3, 2013 2:46 AM



Group: General Forum Members
Last Login: Tuesday, October 18, 2016 12:42 PM
Points: 153, Visits: 1,051
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.


MVP SQL Server
Microsoft Certified Master SQL Server 2008
Microsoft Certified Solutions Master Data Platform, SQL Server 2012
Post #1490815
Posted Tuesday, September 3, 2013 3:18 AM

SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, September 15, 2016 9:40 AM
Points: 886, Visits: 857
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".

Erland Sommarskog, SQL Server MVP,
Post #1490834
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse