SQL - Windows Policy
How can I find out and set if an User is enabled or disabled using SQL commands? Same problem for 开发者_如何学Gowindows policy enabled/disabled for an User.
You can use LOGINPROPERTY - example -
SELECT LOGINPROPERTY('John3', 'IsLocked');
GO
You can use sys.server_principals for checking enabled disabled -
SELECT * from sys.server_principals where "name" = 'loginname'
精彩评论