I'm looking for an answer but i can't found. Just a lot of long scripts.
I need to list Login | Role ( sysadmin, dbcreator, etc ) but i can't find a table to join.
I have this for now:
SELECT name AS Login_Name, type_desc AS Account_Type
FROM sys.server_principals
WHERE TYPE IN ('U', 'S', 'G')
and name not like '%##%'
ORDER BY name, type_desc
I need another collum with the Role.
With table should I search for it?
Thanks.
Aucun commentaire:
Enregistrer un commentaire