While I mainly focus on SQL Server Performance Tuning during my  Comprehensive Database Performance Health Check. I often receive a question from users which are not related to performance tuning. If know the answer, I like to answer them. Today we are going to discuss Unlocking User Without Changing Password.
A client of mine recently locked himself out of SQL Server. The user was not admin so one of the easiest options was to recreate the user. However, before we do that I suggested that they should try out the policy turning off and on and if that works they can easily unlock the user without changing the password. Let us see how we can do that.
ALTER LOGIN YourUserName WITH CHECK_POLICY = OFF; ALTER LOGIN YourUserNameWITH CHECK_POLICY = ON; GO
Now the script above will only work if a user is not set to change the password during the next loging. If that happens, just recreate the user.
If you liked this video, please do not forget to subscribe to my YouTube Channel – SQL in Sixty Seconds.
Here are my few recent videos and I would like to know what is your feedback about them.
- Avoid Join Hints – SQL in Sixty Seconds #172
- One Query Many Plans – SQL in Sixty Seconds #171
- Best Value for Maximum Worker Threads – SQL in Sixty Seconds #170
- Copy Database – SQL in Sixty Seconds #169
- 9 SQL SERVER Performance Tuning Tips – SQL in Sixty Seconds #168
- Excel – Sum vs SubTotal – SQL in Sixty Seconds #167
- 3 Ways to Configure MAXDOP – SQL in Sixty Seconds #166
- Get Memory Details – SQL in Sixty Seconds #165
- Get CPU Details – SQL in Sixty Seconds #164
- Shutdown SQL Server Via T-SQL – SQL in Sixty Seconds #163
- SQL Server on Linux – SQL in Sixty Seconds 162
Reference:Â Pinal Dave (http://blog.SQLAuthority.com)