SQL SERVER sa login 18456 Error with 2012 R2 server

1. 打开数据库——用Windows身份登录数据库

 02、登录名——双击sa(打开属性)

03、常规——设置密码——确定

04、状态——登录:启用——确定

05、 右击服务器名——属性

06、安全性——选中 SQL Server 和 Windows 身份验证模式——确定

 07、 右击服务器名——重新启动——关闭数据库连接,退出程序——用sa登录到数据库


网上各种攻略几乎到此为止,走到这来,还是解决不了我的问题。最后,继续尝试以下步骤,终于解决。


08. Run the menu ServerManager->Tools->Computer Management



09. Restart SQL Server Service :Run the menu ServerManager->Tools->Componet service




10. Set the TCP/IP and Damed Piped to Enable status.



为了增强安全性,返回到客户端的错误消息有意隐藏身份验证错误的本质。但是,在 SQL Server 错误日志中,对应的错误包含映射到身份验证失败条件的错误状态。将错误状态与以下列表进行比较以确定登录失败的原因。

状态说明

1

无法获得错误信息。此状态通常意味着您不拥有接收错误详细信息的权限。请联系 SQL Server 管理员以获得详细信息。

2

用户 ID 无效。

5

用户 ID 无效。

6

尝试同时使用 SQL Server 身份验证与 Windows 登录名。

7

登录已禁用,密码不正确。

8

密码不正确。

9

密码无效。

11

登录有效,但服务器访问失败。

12

登录是有效的登录,但服务器访问失败。

18

必须更改密码。

存在其他错误状态,并表示一个意外的内部处理错误。



To see more about SQL Server Error log.


https://www.mssqltips.com/sqlservertip/2581/sql-server-error-18456-finding-the-missing-databases/


TIP: How to Run Programs as a Domain User from a Non-domain Computer

http://jameskovacs.com/2009/10/11/tip-how-to-run-programs-as-a-domain-user-from-a-nondomain-computer/


StateDescriptionExample (note: the verbose message always has [CLIENT: <IP>] suffix)
1State 1 now occurs when a login is disabled - but actually, the error in the log is 18470, not 18456 - because the login is disabled, it doesn't get that far.  See state 7.

Prior to SQL Server 2005, State 1 always appeared in the log for all login failures, making for fun troubleshooting.  :-)
Error: 18470, Severity: 14, State: 1.
Login failed for user '<x>'.
Reason: The account is disabled.


Msg 18456, Level 14,State 1, Server <server name>, Line 1
Login failed for user ‘<user name>’


ERROR STATE

ERROR DESCRIPTION

2 and 5

Invalid userid

6

Attempt to use a Windows login name with SQL Authentication

7

Login disabled and password mismatch

8

Password mismatch

9

Invalid password

11 and 12

Valid login but server access failure

13

SQL Server service paused

18

Change password required


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值