TechNet
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize
The document is archived and information here might be outdated

sp_helpsrvrole (Transact-SQL)

Returns a list of the SQL Server fixed server roles.

Topic link icon Transact-SQL Syntax Conventions


sp_helpsrvrole [ [ @srvrolename = ] 'role' ]

[ @srvrolename = ] 'role'

Is the name of the fixed server role. role is sysname, with a default of NULL. role can be one of the following 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

bulkadmin

Can execute BULK INSERT statements

0 (success) or 1 (failure)

Column name Data type Description

ServerRole

sysname

Name of the server role

Description

sysname

Description of ServerRole

Fixed server roles are defined at the server level and have permissions to perform specific server-level administrative activities. Fixed server roles cannot be added, removed, or changed.

The following table shows stored procedures that can be used to modify server roles.

Stored procedure Action

sp_addsrvrolemember

Adds a login account to a fixed server role.

sp_helpsrvrolemember

Displays a list of the members of a fixed server role.

sp_dropsrvrolemember

Removes a member of a server role.

Requires membership in the public role.

The following query returns the list of available fixed server roles.

EXEC sp_helpsrvrole
Show:
© 2016 Microsoft