How to find out all the permissions that belong to a specific server/ database role in SQL Server? I can separately query all the server or database level permissions, but I want to know other thing. What server role do the given permissions exactly belong to? For example I want to see all the permissions belonging to securityadmin server role, hence I'll be able to understand what privileges the role has. I want the same for database roles. Can I find this info in SQL Server system tables?

Thanks
Hope the following would help:

Server Level permissions


For server role permissions 
sp_srvrolepermission   
For Logins permissions


select  ge.name as Grantee,
        gr.name as Grantor,
        o.name as ObjectName,
        p.permission_name,
        P.state_desc 
from sys.server_permissions as p
        left join sys.server_principals as Ge on p.grantee_principal_id = ge.principal_id
        left join sys.server_principals as Gr on p.grantor_principal_id = gr.principal_id
        left join sys.objects as o on p.major_id = o.object_id


Database Level Permissions

select  ge.name as Grantee,
        gr.name as Grantor,
        o.name as ObjectName,
        p.permission_name,
        state_desc
from sys.database_permissions as p
        left join sys.database_principals as Ge on p.grantee_principal_id = ge.principal_id
        left join sys.database_principals as Gr on p.grantor_principal_id = gr.principal_id
        left join sys.objects as o on p.major_id = o.object_id
go