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
Solved

SQL Server 2005 - SQL to Grant SELECT Perms on a Single Table

Posted on 2010-08-19
2
397 Views
Last Modified: 2012-05-10
We must manually type SQL to grant permissions.  Otherwise, our SOX monitoring software requires manual follow-up.  This is a directive from management, so we don't have the option to use the nice point and click tools available in SQL Server Management Studio.  We're using Windows authentication.  Assume the following info:
-Domain = dom
-Windows Active Directory group = grp
-Server = srv
-Database Name = db
-Table Name = tbl

If the Active Directory group has no current database perms, what is the SQL needed so that members of the Active Directory group can issue SELECT statements against the table (read-only)?

Thanks so much for any help you can offer.
0
Comment
Question by:nfeliciano
2 Comments
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 50 total points
ID: 33480680
If you don't already have the AD group as a valid login to SQL

CREATE LOGIN [dom\grp] FROM WINDOWS

Create the user within the database tied to the login

CREATE USER grp for login [dom\grp]

Give select permission

GRANT SELECT ON tbl TO grp

If the database has PUBLIC role activated and defaults to GRANT SELECT to PUBLIC, then the AD group would be able to select from all tables anyway.
0
 

Author Closing Comment

by:nfeliciano
ID: 33480774
Your concise explanation also included other helpful info.  Thanks so much for the quick answer.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
2 comma seperated list - SQL Server 12 43
SQL Query with Sum and Detail rows 2 54
kill process lock Sql server 9 63
SQL Server Configuration Manager WMI Error 11 16
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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