Solved

GRANT SQL PERMISSIONS TO AN ACTIVE DIRECTORY GROUP

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

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

726 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