sp_helpsrvrolemember (T-SQL)

Returns information about the members of a Microsoft® SQL Server™ fixed server role.

Syntax

sp_helpsrvrolemember [[@srvrolename =] 'role']

Arguments
[@srvrolename =] 'role'
Is the name of a fixed server role about whose members information is returned. role is sysname, with a default of NULL. If role is not specified, the result set includes information regarding all fixed server roles.

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

Return Code Values

0 (success) or 1 (failure)

Result Sets
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

Remarks

Use sp_helprolemember to display the members of a database role.

Permissions

Execute permissions default to the public role.

Examples

This example lists the members of the sysadmin fixed server role.

EXEC sp_helpsrvrolemember 'sysadmin'

  

See Also
sp_addsrvrolemember sp_helprolemember
sp_dropsrvrolemember System Stored Procedures
sp_helprole  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.