开发者

SQL - Windows Policy

开发者 https://www.devze.com 2023-01-15 16:30 出处:网络
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 -

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

精彩评论

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