Assign most elevated permission to Sql Server DB 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?
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.