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

    

posted on 2014-10-28 21:11  蒋乐兴的技术随笔  阅读(395)  评论(0编辑  收藏  举报

导航