开发者

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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜