Solved

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

Posted on 2010-08-19
2
404 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 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

717 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