SQL SERVER – FIX Error 18456, Severity: 14, State: 58. Login failed for user

One of the most common and searched SQL Server failure is around “Logins”. Login failed for user has always been tricky and interesting to troubleshoot. I don’t think there is a silver bullet to easily troubleshoot the same. With every version of SQL Server, there are enhancements made in error reporting, which try to make life on DBA’s easy. In previous version of SQL, whenever there is a login failed, it would print message in the SQL ERRORLOG along with the state of login failed. It was difficult for a DBA to find the cause further and it all boiled down to doing a number of permutations and combinations of resolution over the internet. Let us see how to FIX Error 18456.

If you are new to SQL Server, then use below to find ERRORLOG

SQL SERVER – Where is ERRORLOG? Various Ways to Find its Location

Here is the message in ERRORLOG

Error: 18456, Severity: 14, State: 58.

Login failed for user ‘AppLogin’. Reason: An attempt to login using SQL authentication failed. The server is configured for Windows authentication only. [CLIENT: <local machine>]

Here was the connection string from the application:

“DRIVER={SQL Server Native Client 10.0};Server=BIGPINAL;Network Library=DBMSSOCN;Initial Catalog=myDB;User ID=AppLogin;Password=myPassword@123”

If you know SQL Server authentication modes, then it’s easy to fix. If you are new to SQL, then here are the steps

  1. Connect to SQL via SQL Server Management Studio.
  2. Right click on the server name on object explorer -> Properties -> Security -> Change Server authentication to “SQL server and Windows authentication mode” -> click OK.

 SQL SERVER – FIX Error 18456, Severity: 14, State: 58. Login failed for user state58-01

  1. After that, open server at object explorer -> Expand security -> Expand Login -> right click on your login -> properties -> type new password -> confirm password -> OK.

In my case AppLogin was created. Else you may need to create the login.

Now disconnect your SQL and restart your system. After this your application should be able to login with the changed password in SQL authentication mode. This tough look simple, sometimes will be of great help. I hope this blog will surely land into someone’s web search someday. I seriously hope it helps you too.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Error Messages, SQL Log, , SQL Server
Previous Post
SQL SERVER – Huge Transaction Log (LDF) for Database in Availability Group
Next Post
SQL SERVER – FIX Error 18456, Severity: 14, State: 6. Login failed for user

Related Posts

8 Comments. Leave new

  • Blogging the simple details even, is the best part of Pinal

    Reply
  • Gursant Kumar
    July 27, 2018 5:44 pm

    “This tough look simple, sometimes will be of great help. I hope this blog will surely land into someone’s web search someday. I seriously hope it helps you too.”
    Nice work done with a nice thought.. It has helped a newbie like myself

    Reply
  • Paul Schofield
    August 2, 2018 10:39 am

    Many thanks indeed, this fixed my problem nicely.

    Reply
  • I am seeing this error a lot in my logs, but the db is already set up to use SQL and Windows authentication.
    Anything else i can look at?

    Reply
  • I am seeing this error a lot in my logs, but the server is already set to use Windows and SQL authentication. Anything else to look at?

    Reply

Leave a Reply