Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

sys.database_role_members (Transact-SQL)

 

Applies To: SQL Server 2014, SQL Server 2016 Preview

Returns one row for each member of each database role.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.

Column name

Data type

Description

role_principal_id

int

Database Principal ID of the role.

member_principal_id

int

Database Principal ID of the member.

Any user can view their own role membership. To view other role memberships requires membership in the db_securityadmin fixed database role or VIEW DEFINITION on the database.

The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. For more information, see Metadata Visibility Configuration.

Community Additions

ADD
Show:
© 2015 Microsoft