Applies To: SQL Server 2014, SQL Server 2016 Preview
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns information about the members of a SQL Server fixed server role.
Applies to: SQL Server (SQL Server 2008 through current version).
Use sp_helprolemember to display the members of a database role.
All logins are a member of public. sp_helpsrvrolemember does not recognize the public role because, internally, SQL Server does not implement public as a role.
To add or removed members from server roles, see ALTER SERVER ROLE (Transact-SQL).
sp_helpsrvrolemember does not take a user-defined server role as an argument. To determine the members of a user-defined server role, see the examples in ALTER SERVER ROLE (Transact-SQL).
The following example lists the members of the sysadmin fixed server role.
EXEC sp_helpsrvrolemember 'sysadmin';