我按照许多教程中的建议在SQL Server 2012上进行了以下设置:
但是当我尝试登录“localhost”时 通过SQL Server身份验证。
它失败了:
Cannot connect to (local).
------------------------------
Login failed for user 'sa'. (Microsoft SQL Server, Error: 18456)
我唯一可以登录的方法仍然是Window身份验证。
我的实例名为MSSQLSERVER。 localhost \ MSSQLSERVER无法访问。
答案 0 :(得分:1)
可能有多种原因。请检查您的错误日志并找到错误状态。根据状态,错误可能是 -
State Description
1 Error information is not available. This state usually means you do not have permission to receive the error details. Contact your SQL Server administrator for more information.
2 User ID is not valid.
5 User ID is not valid.
6 An attempt was made to use a Windows login name with SQL Server Authentication.
7 Login is disabled, and the password is incorrect.
8 The password is incorrect.
9 Password is not valid.
11 Login is valid, but server access failed. One possible cause of this error is when the Windows user has access to SQL Server as a member of the local administrators group, but Windows is not providing administrator credentials. To connect, start the connecting program using the Run as administrator option, and then add the Windows user to SQL Server as a specific login.
12 Login is valid login, but server access failed.
18 Password must be changed.
详细信息 - MSDN