Monday, October 25, 2010

Unlock SA login in Microsoft SQL Server

If you or your team members who has access to your Microsoft SQL Server database with SA login, did type the wrong password three times, normally the SA login will be locked. It should be an error :

Login failed for 'sa' because the account is currently locked out. The system administrator can unlock it.

To solve this problem, you need an authority to access the database server directly. Login with the administrator login name, then open Microsoft SQL Server Management Studio. Choose Windows Authentication mode, then click Connect.

Now, in Query windows type this statement then execute


There's an option to avoid the sa login to be locked forever, just go to Security, Logins, sa, Properties, then uncheck Enforce password policy option.

No comments:

Post a Comment