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?
You'll have to use sqlcmd.exe
with Windows Authentication (Specify the -E flag)
and renable the account:
Open up command prompt and navigate to the SQL Directory
and use sqlcmd.exe -S server -E
USE [YourDatabase]
GO
ALTER LOGIN [sa] ENABLE
GO
login with windows authentication and select server properties and go to security tab check the bubble SQL server and windows authentication click ok.
or
run below query
ALTER LOGIN [sa] WITH PASSWORD='AnyStronG@#Passw)e', CHECK_POLICY=OFF
GO
ALTER LOGIN [sa] ENABLE
GO
Ref:- Enable Sa Login
You'll have to use sqlcmd.exe
with Windows Authentication (Specify the -E flag)
and renable the account:
Open up command prompt and navigate to the SQL Directory
and use sqlcmd.exe -S server -E
USE [YourDatabase]
GO
ALTER LOGIN [sa] ENABLE
GO
© 2022 - 2024 — McMap. All rights reserved.