Solved

Database privileges by table Report

Posted on 2014-04-01
2
140 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 69

Accepted Solution

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

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

688 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