Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, June 20, 2014 8:23 AM
Points: 738, Visits: 1,305
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


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:57 PM
Points: 13,606, Visits: 10,490
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 LessThanDot.

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

Add to briefcase

Permissions Expand / Collapse