In order to enhance security, the error message returned to the client intentionally hides the essence of the authentication error. However, in the SQL Server error log, the corresponding error contains an error status mapped to an authentication failure condition. Compare the error status with the following table to determine the reason for the login failure.
2 the user ID is invalid.
6 Try to use both SQL Server authentication and Windows login.
Login has been disabled, and the password is incorrect.
8 The password is incorrect.
9 The password is invalid.
1 1 login is valid, but the server access failed.
13 login is a valid login, but the server access failed.
18 password must be changed.
If Windows authentication mode is selected during installation, the sa login name will be disabled. If you change the authentication mode to "SQL Server and Windows Authentication Mode" later, sa login will still be disabled. This will result in a status 7 error: "User' sa' failed to log in". To enable the sa login account, use the ALTER LOGIN statement.
As we all know, sa account is a well-known SQL Server account, which is often targeted by malicious users. Do not enable the sa account unless the application requires it. It is very important to log in to sa with a strong password.
Sa login can only use SQL Server authentication to connect to the server.
Change the security authentication mode:
In the Object Explorer of SQL Server Management Studio, right-click the server, and then click Properties.
On the Security page, under Server Authentication, select a new server authentication mode, and then click OK.
In the SQL Server Management Studio dialog box, click OK to confirm that SQL Server needs to be restarted.
4. In Object Explorer, right-click the server, and then click Restart. If SQL Server Agent is running, you must also restart it.
Kouwang website home page
Enable sa login account with Management Studio.
In Object Explorer, expand Security, expand Login, right-click sa, and then click Properties.
On the General page, you may need to create a password for sa login and confirm it.
On the Status page, in the Login section, click Enable, and then click OK.
Finally, don't paste the password, it won't connect. The results of long-term testing.