I cannot enable sa account

asp.net programmer picture asp.net programmer · Aug 1, 2013 · Viewed 45.6k times · Source

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?

Answer

Darren picture Darren · Aug 1, 2013

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

http://msdn.microsoft.com/en-us/library/ms162773.aspx