November 23, 2011 at 2:32 pm
While looking in vain for a certain property in various system catalog views, I found what I was looking for in a LOGINPROPERTY. The property I was looking was for whether a login has been locked out or not. This is not exposed in any system catalog view as far as I know.
It got me to wondering about the apparent inconsistency -- why some data would be available only via a special function and not in a view. It makes for a fragmented experience trying to find where's whatever. I wonder if anybody else maybe knows the answer or at least maybe whether there's reason/rhyme behind what should appear in a system catalog view and what should be available through function only?
TIA.
November 23, 2011 at 3:53 pm
Will have to look tonight, but wouldn't the is_disabled column equate to the locked value returned by the loginproperties function?
November 23, 2011 at 4:21 pm
Well, I didn't explicitly test this but I assumed not so because is_disabled correlate to whether a login is disabled or not and not to whether a login is locked out due to excessive failed logins --
To re-enable a disabled login, we'd do an "ALTER LOGIN abuser ENABLE;" and to unlock a login, it'd be "ALTER LOGIN abuser WITH PASSWORD = 'stop abusing' UNLOCK;", so even if is_disabled did map to both disabled & locked out login, it wouldn't tell which statement would be the correct one to issue.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply