Login failed for user ‘sa’. (.Net SqlClient Data Provider) – sql server 2008
Problem:
Error : Login failed for user ‘sa’. (.Net SqlClient Data Provider) – sql server 2008
Server Name: .\sqlexpress
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
Solution :
After Installing MS – Sql server 2008, Sql server only enable for windows authentication.
Follow below steps to resolve this issue and enable sa user in mix authentication mode.
1) In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
2) On the Security page, under Server authentication, select the Sql server and Windows authentication mode, and then click OK.
3) In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
To restart SQL Server from SQL Server Management Studio
•In Object Explorer, right-click your server, and then click Restart. If SQL Server Agent is running, it must also be restarted.
4) To enable the sa login by using Management Studio, In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
5) On the General page, you might have to enter new password and confirm a password for the sa login.
6) On the Status page, in the Login section, click Enabled, and then click OK.
7) then again restart SQL Server from SQL Server Management Studio.