SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Tracking User access to a database on SQL 2008R2 Standard


Tracking User access to a database on SQL 2008R2 Standard

Author
Message
adelavigne
adelavigne
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 14
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 Studio 10.50.2550.0
Operating System 6.1.7601
-----------------------------------------------------------

Thanks in Advance
adelavigne
Andreas.Wolter
Andreas.Wolter
SSC-Addicted
SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)SSC-Addicted (479 reputation)

Group: General Forum Members
Points: 479 Visits: 1056
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
Erland Sommarskog
Erland Sommarskog
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5520 Visits: 875
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, www.sommarskog.se
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search