SQL Server 查看对象的权限
例子 1、
查看登录名 loginA的权限:
create login loginA
with
password = '123456';
go
use studio;
create user loginA_user
for login loginA;
go
select * from sys.server_principals as pp inner join sys.server_permissions as ps
on ps.grantee_principal_id = pp.principal_id and pp.name = 'loginA';
go