Solved

Database privileges by table Report

Posted on 2014-04-01
2
134 Views
Last Modified: 2014-06-20
I would like to write a query on a sql 2008r2 that will report all the users that have delete, insert, update and select access by table in a database, either directly by windows or SQL Login or due to roles, etc.

This report would be used for security auditing purposes.  I need to provide a report for each of our production databases to our auditors.  Not sure if anyone has a query that will fit my needs completely, but hopefully something that will give me a good start.
0
Comment
Question by:IllinoisDave
2 Comments
 
LVL 10

Expert Comment

by:HuaMinChen
ID: 39971663
Try
SELECT d.name, l.name
FROM     all_logins l
CROSS    JOIN sys.databases d

Open in new window

0
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 400 total points
ID: 39972596
For AD group members, you'll need a separate table that tells you which users are in which group(s).

When I have more time, I'll put together at least some initial code.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now