Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in my local machine I have SSMS (SQL Server 2008 R2).
For user xxxx Server Roles are as public.

when i try to change it to sysadmin it through error

User does not have permission to perform this action. (.Net SqlClient Data Provider)
Error Code 15247
  1. Servertype: (local)/SQLExpress
  2. Authentication: Windows Authentication
  3. user: ComputerName\username (disabled)
  4. password: none (disabled)

How can i do this?

share|improve this question

migrated from Feb 14 '12 at 22:57

This question came from our site for professional and enthusiast programmers.

Is the user you're connecting as a sysadmin already? – Aaron Bertrand Feb 13 '12 at 18:56
no, just server role is : public but Windows Admin user – HaBo Feb 13 '12 at 19:03
In order to give someone sysadmin, you need to be sysadmin. This may sound like chicken and egg but is one of the reasons you shouldn't click Next > Next > Next through setup. If your windows user is not sysadmin in SQL Server, can you log in via SQL auth using the sa account? Or is it not in mixed mode? – Aaron Bertrand Feb 13 '12 at 19:04
it is mixed mode, but i don't remember the password for sa :( and i can't change the password as i am not sysadmin. is there any way i can create one sysadmin user account or make my account as sysadmin and get full control on my SSMS – HaBo Feb 13 '12 at 19:29
Google is your friend.… – Aaron Bertrand Feb 13 '12 at 19:30

Based on the comments, you've explained that you don't have the SA password and you're not an administrator. In that case, you're going to have to hack your way around it.

That post explains how to impersonate the NT AUTHORITY\SYSTEM login using PsExec (or creating a Windows Scheduled Task running under the SYSTEM account) to create a new login for yourself. Then, you can log in via that new login, and grant your Windows account SA permissions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.