Solved

GRANT SQL PERMISSIONS TO AN ACTIVE DIRECTORY GROUP

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
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…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now