Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

What's the proper syntax for scripting a create login, associated with a group in AD? Expand / Collapse
Author
Message
Posted Tuesday, July 16, 2013 10:20 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 8:37 AM
Points: 1,023, Visits: 1,781
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.
Post #1474214
Posted Tuesday, July 16, 2013 1:33 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 1:09 PM
Points: 15,270, Visits: 13,072
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?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1474270
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse