RSS

Unlock the ‘sa’ account in SQL Server

18 Jan

Just thought I would add this invaluable bit of SQL as it comes up time and time again here.  You only get a couple of attempts to give the correct password to the sa account when loggin into SQL Server before the account becomes locked.

If this happens hopefully you will have a backup admin account or able to log in via integrated authentication.

If this is the case, log in and open a new Query window and type the following:

ALTER LOGIN sa WITH PASSWORD = ‘new_password’ UNLOCK

Job done, the sa account is now unlocked ready for someone to come along and lock it out again!!

Advertisements
 
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: