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.
The first step is to review the SQL Server error log. A snapshot from error log is shown below.
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.
Another cause for this error can be wrong password as shown below in SQL Server error log snapshot.
The solution for this is known better to you