sp_readerrorlog – Msg 22004, Level 16, State 1, Line 0 – Failed to open loopback connection. Please see event log for more information.
Recently while working on a SQL Server for a client I came across the following error when I attempted to view the SQL Server logs in SSMS.
From there I decided I needed to track this down, so I attempted to run the sp_readerrorlog stored procedure, which also failed, but it provided more informaiton.
The full error message was:
Msg 22004, Level 16, State 1, Line 0
Failed to open loopback connection. Please see event log for more information.
Msg 22004, Level 16, State 1, Line 0
Error log location not found.
I did some searching the web and there many different solutions. Some solutions said to install an updated ODBC drivers, others suggested adding the server name to the host file to map 127.0.0.1 as the current server name, another mentioned a TCP alias, and one even suggested that I was running out of server connections. I tried several and none of these helped.
The I went back to the original error message which stated “Please see event log for more information.” So I checked the event log and found this:
So after discovering that the NT SERVICE\MSSQL$SQLEXPRESS user couldn’t log in, I tracked down that that was the user that SQL Server was running as. I added that user to SQL Server and it fixed the problem.
More from Stedman Solutions:
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!
Leave a Reply