How to view the permissions of a user in t-sql

  • Hi,

    I have made this script wich returns the users that are on my SQL Server:

    use master

    go

    select name as Utilizador, type_desc as Tipo_Autenticação,

    replace(replace(is_disabled,'0','Activo'),'1','Inactivo') as Status

    from sys.server_principals where (type ='s' or type ='u')

    Know, i want to display with each user the permissions that it was.

    The server roles, database roles, ...

    How can i do this in t-sql?

    Thank you

  • A good script that will give you all the account details of a database

    http://www.sqlservercentral.com/scripts/Maintenance+and+Management/31889/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply