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