SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What's the proper syntax for scripting a create login, associated with a group in AD?


What's the proper syntax for scripting a create login, associated with a group in AD?

Author
Message
Rod
Rod
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2864 Visits: 2068
In Active Directory, we've got a group named "Domain Users", and basically everyone is in that group. I want to associated a SQL login, with that group. And I want to do this in SQL Server 2008 R2 Express, which will be installed on all users' PCs. The thing is that I've looked up the syntax for the command, and even went through the process of scripting it, but am not sure how what I've got will work. Here's the script:


USE [master]
GO
CREATE LOGIN [OUR_DOMAIN\Domain Users] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO



Will that create a SQL login, that will be associated with the "Domain Users" group defined in AD? (We're using AD on a Windows 2003 R2 domain.)

Kindest Regards,Rod
Connect with me on LinkedIn.
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28101 Visits: 13268
Yes.

CREATE LOGIN (Transact-SQL)


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search