SQL Server 2014 – How to Resolve Login Issues

configurationloginssql server

I have a login issue here. I created a new user login in SQL Server 2014. I tried to connect to my database using this new login and the below error pops up

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

I searched for the error and found out that I have to be in mixed authentication mode. I went to properties of the server and changed it to mixed mode from security tab, restarted SQL Server and still the same issue. I tried to investigate more and when I tried the below query

SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly')   
WHEN 1 THEN 'Windows Authentication'   
WHEN 0 THEN 'Windows and SQL Server Authentication'   
END as [Authentication Mode]

It shows that I'm still in Windows Authentication mode, although the fact is that I changed it to mixed mode.

I am still stuck with this issue and am not able to identify the problem. Can anyone help me out?

I am connecting from SSMS, not code.

Right clicking the server and going to properties -> security, shows SQL Server and Windows.

Best Answer

This always happens because during setup you forgot to adjust your instance to be in both Windows and server authentication. Open SQL Server Management Studio; log in using Windows authentication; right click on your server then properties, then security tab, and mark on both Windows and server authentication; then click ok.

Close SSMS then here is the trick:

  • start SQL Server configuration
  • stop all the services
  • restart all the services

then you will be able to connect in SQL Server authentication.