Question : make sys.database_role_members meaningful

what views would you join the above to get 'meaningful' info out, instead of just some numbers.

thanks

Answer : make sys.database_role_members meaningful

Hope this is what you are expecting:

SELECT p.NAME role_name,m.NAME user_name
FROM sys.database_role_members rm
JOIN sys.database_principals p
ON rm.role_principal_id = p.principal_id
JOIN sys.database_principals m
ON rm.member_principal_id = m.principal_id
Random Solutions  
 
programming4us programming4us