Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Database privileges by table Report

Posted on 2014-04-01
2
Medium Priority
?
147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

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 70

Accepted Solution

by:
Scott Pletcher earned 1600 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

610 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