sa密码不满足强密码要求
In this article, we will review how to recover SA password by starting SQL Server in single user mode when you forget “sa” credentials or lose the access to the instances due to the following reasons:
在本文中,由于以下原因,当您忘记“ sa ”凭据或失去对实例的访问权限时,我们将回顾如何通过以单用户模式启动SQL Server来恢复SA密码:
- You configured a new SQL Server instance and lost or forgot the “sa” password 您配置了新SQL Server实例,并丢失或忘记了“ sa ”密码
- All the users who are part of sysadmin server level role are removed accidentally 属于sysadmin服务器级别角色的所有用户被意外删除
- All the users who are part of sysadmin server level role are disabled accidentally 属于sysadmin服务器级别角色的所有用户均被意外禁用
- Lost sysadmin access to the SQL Server instance 失去系统管理员对SQL Server实例的访问权限
Consider this scenario:
考虑这种情况:
Initially, I was a member of the [BUILTIN\Administrators] group. To illustrate this scenario, I connected to SQL Server using Windows authentication and I deleted all the logins in the SQL Server instance. Please refer to the below image that shows all the logins that were deleted and the login “sa” is disabled.
最初,我是[BUILTIN \ Administrators]组的成员。 为了说明这种情况,我使用Windows身份验证连接到SQL Server,并删除了SQL Server实例中的所有登录名。 请参考下图,该图显示了所有已删除的登录名,并且禁用了登录名“ sa” 。
I closed the connection and tried to connect the SQL Server instance using the same account which I used earlier. I am unable to log in as I deleted all the logins and the group [BUILTIN\Administrators] from which I gained access earlier. Please refer to the below image that shows login failure error.
我关闭了连接,并尝试使用之前使用的相同帐户连接SQL Server实例。 我删除了所有登录信息和较早获得访问权限的组[BUILTIN \ Administrators],因此无法登录。 请参考下图,显示登录失败错误。