Take the 2-minute tour ×
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.

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
    
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
2  
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. blogs.msdn.com/b/sqlexpress/archive/2010/02/23/… –  Aaron Bertrand Feb 13 '12 at 19:30
show 2 more comments

migrated from stackoverflow.com Feb 14 '12 at 22:57

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

1 Answer

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.

http://sqlblog.com/blogs/argenis_fernandez/archive/2011/07/10/think-your-windows-administrators-don-t-have-access-to-sql-server-2008-by-default-think-again.aspx

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
add comment

Your Answer

 
discard

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.