Solved

GRANT SQL PERMISSIONS TO AN ACTIVE DIRECTORY GROUP

Posted on 2010-11-16
2
493 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
[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 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

724 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