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.

I am using SQL server 2008 R2, on my development machine. I had to delete the old windows user account, with which I had installed SQL Server.

I have created a new admin account. When doing any DB related work in Visual Studio with new user, I get DB Access denied error on master table.

As this is basically for development purpose, I need most elevated permission for this user.

How do I grant a windows user admin rights to all the tables?

share|improve this question

migrated from stackoverflow.com Feb 6 '13 at 8:24

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

add comment

1 Answer 1

up vote 1 down vote accepted

Assuming this is a Windows Auth only instance (with no sa access), try using psexec per here.


An actual backdoor into SQL Server does exist that does not require restarting and/or rebooting anything into single-user mode. I have done this on systems where I did not have access but needed to check stuff.

Download PSexec tools from here. Place this on the server and then in a command prompt execute this command:psexec -i -s SSMS.exe, or sqlwb.exe

This will open up SSMS as the system account that has sysadmin access to the instance of SQL Server. This is done during installation of SQL Server, however I have heard that this will not be so with SQL 2012.

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.