Created
February 8, 2011 22:06
-
-
Save zippy1981/817375 to your computer and use it in GitHub Desktop.
Script to make a windows user a sql server sysadmin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- First we create a login from our user | |
CREATE LOGIN [domain\justin.dearing] FROM WINDOWS; | |
GO | |
-- Now we make him sysadmin | |
EXEC sp_addsrvrolemember | |
@rolename='sysadmin', | |
@loginame='domain\justin.dearing' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment