Locked out of SQL Server

Today I had problems with logging in to my newly installed SQL Server instance. During the install i choose “Windows mode” but I did mange to mess up which user that has access to SQL Server. I tried to start up in Single user mode which did not work, but I found this blog post that had a great solution:

 

http://www.mssqltips.com/sqlservertip/2682/recover-access-to-a-sql-server-instance/

 

sql-server-loggon

 

Basically these steps:

 

1. Install PSExec

2. Open the command line with “Run as administrator”

3. Run this command:  PsExec -s -i "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe"

 

This will open SQL Server Management Studio as the NT AUTHORITY\SYSTEM-account which has all the privileges needed.


PS. If you like the blog post - please share it =D

Don't miss upcoming posts!

Sign up for my mailing list to get updates when new content is published.








Tillbaka