Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Added note for future readers that this hack is version specific now.
Source Link
user47078
user47078

Since you are a local adminstrator you can use the backdoor to SQL Server instance to obtain access.

Download psexec.exe (PSTools from TechNet here).

Go to a command prompt and to the directory where you extracted the file (psexec.exe). Run the command psexec.exe -i -s ssms.exe or psexec.exe -i -s sqlwb.exe for SQL 2005.

This is going to open SSMS as the NT AUTHORITY\SYSTEM account, which by default is given SYSADMIN rights to the instance. You should then be able to add your login to the instance. If this does not work it is likely the system account permission was removed.

NOTE: If you are on Vista or Windows 7 you will probably need to run the command prompt as Administrator (right-click "run as Administrator").

Second Note: This will not work on SQL Server 2012 or above because the built-in administrator group is no longer added as sys admin by default. The exception to this could be if you are eating with an in-place upgrade.

Since you are a local adminstrator you can use the backdoor to SQL Server instance to obtain access.

Download psexec.exe (PSTools from TechNet here).

Go to a command prompt and to the directory where you extracted the file (psexec.exe). Run the command psexec.exe -i -s ssms.exe or psexec.exe -i -s sqlwb.exe for SQL 2005.

This is going to open SSMS as the NT AUTHORITY\SYSTEM account, which by default is given SYSADMIN rights to the instance. You should then be able to add your login to the instance. If this does not work it is likely the system account permission was removed.

NOTE: If you are on Vista or Windows 7 you will probably need to run the command prompt as Administrator (right-click "run as Administrator").

Since you are a local adminstrator you can use the backdoor to SQL Server instance to obtain access.

Download psexec.exe (PSTools from TechNet here).

Go to a command prompt and to the directory where you extracted the file (psexec.exe). Run the command psexec.exe -i -s ssms.exe or psexec.exe -i -s sqlwb.exe for SQL 2005.

This is going to open SSMS as the NT AUTHORITY\SYSTEM account, which by default is given SYSADMIN rights to the instance. You should then be able to add your login to the instance. If this does not work it is likely the system account permission was removed.

NOTE: If you are on Vista or Windows 7 you will probably need to run the command prompt as Administrator (right-click "run as Administrator").

Second Note: This will not work on SQL Server 2012 or above because the built-in administrator group is no longer added as sys admin by default. The exception to this could be if you are eating with an in-place upgrade.

Source Link
user47078
user47078

Since you are a local adminstrator you can use the backdoor to SQL Server instance to obtain access.

Download psexec.exe (PSTools from TechNet here).

Go to a command prompt and to the directory where you extracted the file (psexec.exe). Run the command psexec.exe -i -s ssms.exe or psexec.exe -i -s sqlwb.exe for SQL 2005.

This is going to open SSMS as the NT AUTHORITY\SYSTEM account, which by default is given SYSADMIN rights to the instance. You should then be able to add your login to the instance. If this does not work it is likely the system account permission was removed.

NOTE: If you are on Vista or Windows 7 you will probably need to run the command prompt as Administrator (right-click "run as Administrator").