在SQL SERVER 2008上上禁用sa登录时,遇到下面错误:“Cannot set a credential for principal 'sa'. (Microsoft SQL Server,错误: 15535)”
官方文档https://support.microsoft.com/zh-cn/kb/956177 分析了原因以及解决方案。
出现原因
如 果在登录属性-sa对话框的常规选项卡上未选中映射到凭据复选框,将出现此问题。如果未选中此复选框,则 SQL Server 2008年将尝试除去任何凭据映射到您的登录凭据。因为您的凭据不能设置为"sa"的登录,您将收到时单击确定关闭对话框"症状"一节中提到的异常错误消 息。
This problem occurs if the Map To Credential check box is not selected on the General tab of the Login Properties - sadialog box. If this check box is not selected, SQL Server 2008 will try to drop any credential that is mapped to your login credentials. Because your credentials cannot be set to the "sa" login, you receive the exception error message that is mentioned in the "Symptoms" section when you click OK to close the dialog box.
解决方案
要解决此问题,请确保您选择登录属性-sa对话框的常规选项卡上的映射到凭据复选框,您更改"sa"的登录属性,然后单击确定以关闭该对话框之前。