James
James

Reputation:

How to unlock user account in SQL Server 2005 Management Studio?

One of user name tried login many times and failed. Sql server 2005 locked account automatically. How can I unlock user account in SQL Server 2005 Management Studio?

Upvotes: 6

Views: 48333

Answers (3)

Tao
Tao

Reputation: 14006

Tip/workaround from http://www.sqldbadiaries.com/2010/07/21/unlock-sql-user-without-changing-the-password/#ixzz2OBIJCsqv

ALTER LOGIN sqluser WITH CHECK_POLICY = OFF;
ALTER LOGIN sqluser WITH CHECK_POLICY = ON;
GO

Upvotes: 3

gbn
gbn

Reputation: 432471

Bug via SSMS in SQL 2005. Only SQL 2008

I assume you know the password or can reset it. From BOL, ALTER LOGIN

ALTER LOGIN foo WITH PASSWORD = '<enterStrongPasswordHere>' UNLOCK

Upvotes: 7

TLiebe
TLiebe

Reputation: 7996

Open Server Management Studio, connect to the server and go to the Security --> Logins item in Object Explorer. Select the login that is locked out and double-click on it. The Status page should let you re-enable the login (uncheck the "Login is locked out" box).

Upvotes: 2

Related Questions