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

x
?
Solved

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

Posted on 2010-08-19
2
Medium Priority
?
406 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
[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 58

Accepted Solution

by:
cyberkiwi earned 200 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

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…
In this article I will describe the Backup & Restore 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.
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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 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