Skip to content

Instantly share code, notes, and snippets.

@derekmurawsky
Last active December 30, 2015 00:39
Show Gist options
  • Save derekmurawsky/7751173 to your computer and use it in GitHub Desktop.
Save derekmurawsky/7751173 to your computer and use it in GitHub Desktop.
Add BUILTIN\Administrators as a sysadmin is MSSQL. This was broken/fixed, depending on your POV, in newer versions of SQL server. This will restore it. Be aware, this is a security risk and was changed for a reason.
EXEC sp_grantlogin 'BUILTIN\Administrators'
EXEC sp_addsrvrolemember 'BUILTIN\Administrators','sysadmin'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment