I dont have users in sysadmin except [sa] user
unfortunately, I logged in as [sa] user and disabled it
then I cant enable it, what I can do to enable it again?
I dont have users in sysadmin except [sa] user
unfortunately, I logged in as [sa] user and disabled it
then I cant enable it, what I can do to enable it again?
您必须使用sqlcmd.exe
并Windows Authentication (Specify the -E flag)
重新启用该帐户:
打开命令提示符并导航到SQL Directory
并使用sqlcmd.exe -S server -E
USE [YourDatabase]
GO
ALTER LOGIN [sa] ENABLE
GO
使用 Windows 身份验证登录并选择服务器属性并转到安全选项卡检查气泡 SQL 服务器和 Windows 身份验证单击确定。
或者
在查询下方运行
ALTER LOGIN [sa] WITH PASSWORD='AnyStronG@#Passw)e', CHECK_POLICY=OFF
GO
ALTER LOGIN [sa] ENABLE
GO
参考:-启用 Sa 登录