The error – SQL Server error 18456 login failed for user sa may occur because of different reasons.  The first step to get it resolve is to check the SQL Server error log. I tried to replicate the error. The error occurs when you try to login to SQL Serve with SQL Server login. A snapshot from error is shown below.

1_sql server error 18456 login failed for user sa

The first step is to review the SQL Server error log. A snapshot from error log is shown below.

2_sql server error 18456 login failed for user sa

The error log says that the SQL Server is configured for Windows Authentication. The solution is to configure SQL Server to allow Windows and SQL Server authentication mode.

To do this, right click on server node in object explorer | Properties | Security Pane | Server Authentication Section | select SQL Server and Windows Authentication mode as shown below.

3_sql server error 18456 login failed for user sa

Another cause for this error can be wrong password as shown below in SQL Server error log snapshot.

4_sql server error 18456 login failed for user sa

The solution for this is known better to you :)

 

Regards

Ahmad Osama

Like us on FaceBook Join the fastest growing SQL Server group on FaceBook

Follow me on TwitterFollow me on FaceBook