Returns information about the members of a Microsoft® SQL Server™ fixed server role.
sp_helpsrvrolemember [[@srvrolename =] 'role']
role can be any of these values.
Fixed server role | Description |
---|---|
sysadmin | System administrators |
securityadmin | Security administrators |
serveradmin | Server administrators |
setupadmin | Setup administrators |
processadmin | Process administrators |
diskadmin | Disk administrators |
dbcreator | Database creators |
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
ServerRole | sysname | Name of the server role |
MemberName | sysname | Name of a member of ServerRole |
MemberSID | varbinary(85) | Security identifier of MemberName |
Use sp_helprolemember to display the members of a database role.
Execute permissions default to the public role.
This example lists the members of the sysadmin fixed server role.
EXEC sp_helpsrvrolemember 'sysadmin'
sp_addsrvrolemember | sp_helprolemember |
sp_dropsrvrolemember | System Stored Procedures |
sp_helprole |