Returns information about the members of a role in the current database.
sp_helprolemember [[@rolename =] 'role']
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
DbRole | sysname | Name of the role in the current database |
MemberName | sysname | Name of a member of DbRole |
MemberSID | varbinary(85) | Security identifier of MemberName |
If a subrole is a member of the specified role, use sp_helprolemember with the name of the subrole to see the members of the subrole.
Use sp_helpsrvrolemember to display the members of a fixed server role.
Execute permissions default to the public role.
This example displays the members of the Sales role.
EXEC sp_helprolemember 'Sales'
sp_addrolemember | sp_helpsrvrolemember |
sp_droprolemember | System Stored Procedures |
sp_helprole |