• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

give sysadmin previledge back to BUILTIN\Administrators

If sysadmin role was removed from BUILTIN\Administrators a while back,and needed to give it back, how can it be done?

0
anushahanna
Asked:
anushahanna
  • 2
  • 2
1 Solution
 
CboudrozCommented:
You need to be sysadmin and run:

-- Run this if User has been drop from Server Login
CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS WITH DEFAULT_DATABASE=[master]

-- Run this to add it back to sysadmin roles
EXEC master..sp_addsrvrolemember @loginame = N'BUILTIN\Administrators', @rolename = N'sysadmin'
0
 
anushahannaAuthor Commented:
can this done through the OS?
0
 
CboudrozCommented:
it's a SQL security so you need to connect to SQL server and run these command.  

You can used sqlcmd Utility to run the command if you don't want to use  management studio.

http://msdn.microsoft.com/en-us/library/ms162773.aspx


but make sure you connect as sysadmin.



 
0
 
anushahannaAuthor Commented:
thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now