I have created login account on my localhost\sql2008 Server (Eg. User123)
Mapped to Database (default)
Authentication Mode on SQL Server is set to both (Windows and SQL)
But login to SQL Server fails with following message (for User123)
Note: Have checked multiple time that UserName / Password are typed in correctly
Error Details:
Login failed for user 'User123' (Net.SqlClient Data Provider)
Server Name : localhost\sql2008 Error Number: 18456 Severity : 14 State : 1 Line Number : 65536
any help on this please.
This question is related to
sql-server
sql-server-2008
The correct solution to the problem is to make sure SQL server authentication is turned on for your SQL Server.
After enabling "SQL Server and Windows Authentication mode"(check above answers on how to), navigate to the following.
Finally restart the SQL Server.
You need to enable SQL Server Authentication:
You can access this by
Right click on instance (IE SQLServer2008)
Select "Properties"
Select "Security" option
Change "Server authentication" to "SQL Server and Windows Authentication mode"
Restart the SQLServer service
Right click on instance
Click "Restart"
Just for anyone else reading this: This worked for me on 2012 SQL Server too. Thanks
I had this same problem, however mine was because I hadn't set the Server authentication to "SQL Server and Windows Authentication mode" (which you had) I just wanted to mention it here in case someone missed it in your question.
You can access this by
Source: Stackoverflow.com