Solved

GRANT SQL PERMISSIONS TO AN ACTIVE DIRECTORY GROUP

Posted on 2010-11-16
2
483 Views
Last Modified: 2012-05-10
I need to create SQL tables in a query and then grant permissions. This is a process that will be repeated over and over as one of my VB.net programs is executed.

I have already succeeded in creating the tables and granting permissions to a SQL group called DYNGRP (a default group with Dynamics GP).  However, I also have a windows active directory group called SNUGZ\shopfloor. When I try to grant permissions to this group, the query fails because of the '\'.  If I try to just use shopfloor, the group is not recognized.

Can someone tell me how to either add this windows group to the SQL group DYNGRP, or what syntax can I use in my query to give permissions directly to SNUGZ\shopfloor?

T
0
Comment
Question by:thoecherl
2 Comments
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 500 total points
ID: 34150063
use master
go

CREATE LOGIN  [SNUGZ\shopfloor] FROM WINDOWS;
GO

use yourb
go

CREATE USER [SNUGZ\shopfloor] FOR LOGIN [SNUGZ\shopfloor] ;
GO

GRANT SELECT ON dbo.yourtable TO [SNUGZ\shopfloor];
GO

Hope this helps
0
 

Author Closing Comment

by:thoecherl
ID: 34150331
Thank you.
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

856 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