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

  • 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.

  • Yes.

    CREATE LOGIN (Transact-SQL)

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply