Blog Post

SQL Server – How to Enable a Disabled SQL Server Login

,

When an account is disable it cannot be used to login to SQL Server. You will receive below error when logging-in to SQL Server using a disabled Login account:

image

You can enable a disabled SQL Server Login using SQL Server Management Studio or via T-SQL code.

 

To enable a Login using SQL Server Management Studio:

1. Open SQL Server Management Studio

2. Login to Server using a system/security administrator account

3. Locate the disabled login under Security > Logins in Object Explorer

image

4. Right Click on Login Name and select Properties.

5. Go to Status Tab and Select "Enabled" under "Login:"

image

6. Click on "OK" to apply changes.

 

To enable a Login using T-SQL Code:

1. Login to Management Studio with a system/security administrator account and execute below T-SQL code:

ALTER LOGIN [User01] ENABLE

GO

Executing above code will enable a disabled login account.

Hope This Helps!

Vishal

If you like this post, do like my Facebook Page -> SqlAndMe
EMail me your questions -> Vishal@SqlAndMe.com
Follow me on Twitter -> @SqlAndMe

Filed under: Management Studio, SQLServer, SQLServer 2005, SQLServer 2008, SQLServer 2008 R2, SQLServer 2012

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating