Solved

GRANT SQL PERMISSIONS TO AN ACTIVE DIRECTORY GROUP

Posted on 2010-11-16
2
478 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

776 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