Tuesday, August 24, 2010

ERROR:Property IsLocked is not available

Yesterday one of my friend was facing following issue.
When he was trying to edit one of the SQL Server Login property manually using GUI, as soon as he was clicking on that login SQL Server was giving following error.
Error:-
"Property IsLocked is not available for Login '[sa]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)"

Root Cause:-
"This issue arise when you enforce check_policy for our SQL Auth accounts. So if your check_policy is on and your password has been expired or your password has been locked due to number of wrong attempts. it may not allow you to open the login window and it will through the error."

Resolution:-

To resolve this issue you will have to alter the login in either one of the 2 was following way.
1. if you are fine with changing the password.
alter login (Login name) with password = 'yourpwd' unlock,check_policy = off,check_expiration = off

Or

2.if you dont want to change the password.
alter login (Login name) with check_policy = off,check_expiration = off

Happy Learning.

1 comment:

  1. I experienced the same problem. But instead resetting the accounts I reboot the server and problem is fixed. Then in a day or two it happens again. This problem started to appear after 3 years of use of SQL 2005 only on one of the machines. Any thoughts?

    ReplyDelete