No Login for SQL Server but I am Local Admin

654 views Asked by At

I am a local Admin on my machine. Same old thing, my account wasnt added when SQL Server was installed, and I don't want to have to reinstall SQL Server. I went through this blog and it worked until I tried to log and run the commands via SQLCMD or SSMS. I got the error message

"Login failed for user '/'. Reason: Server is in single user mode. Only one administrator can connect at this time.."

I found this blog and added the application name after the m switch http://sqlserver-help.com/2013/12/06/help-how-to-fix-error-reason-server-is-in-single-user-mode-only-one-administrator-can-connect-at-this-time/. But no dice, I still get the above error. The User Account looks fine I guess, I am an Administrator.

Also, I had to start the cmd prompt as an Admin to start sqlserver in single user mode. OR else I couldnt have access to the log files that the instance was using and it was giving me an error to that. So I ran the cmd prompt as admin. But still, I am the same admin trying to run SQLCMD or SSMS. It shoudlnt be telling me there is already an admin logged in, because I am that admin. What am I missing?

This is on SQLExpress, I dunno if that matters

Thanks!

1

There are 1 answers

0
Joscion On BEST ANSWER

First login to the server: "sqlcmd –A –d master" . connect to the master database with the DAC because master is guaranteed to be available if the instance of the Database Engine is started.

Shut down the database server and restart it with minimal configuration:

sqlservr.exe -f -s <instancename>

If it works fine, then you have a problem with your startup configurations and you need to find out which is causing you the issues.