Add local windows Administrators group to SQL Logins

Adding Windows groups (local or domain) based security is best practice as it can help you in a situation where you loose credentials potentially.

You want to add Local Windows Administrators group to have SA or any other permissions in SQL. Ok you would think that it would be something like.

USE [master]
CREATE LOGIN [<Server name>\administrators] FROM WINDOWS


Not quite… the <Server name> needs to be replaced by the keyword BUILTIN as in below

USE [master]
CREATE LOGIN [builtin\administrators] FROM WINDOWS

Hope this saved you some headache today. Now you can proceed to define security for this group within SSMS or via TSQL









IT professional with wider interest in technology

Tagged with: , , , ,
Posted in Active Directory, security, sql, SQL Server, tsql

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: