Returns a list of the Microsoft® SQL Server™ fixed server roles.
sp_helpsrvrole [[@srvrolename =] 'role']
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 |
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 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. |
Execute permissions default to the public role.
This example shows the list of available fixed server roles.
EXEC sp_helpsrvrole
sp_addsrvrolemember | sp_helpsrvrolemember |
sp_dropsrvrolemember | System Stored Procedures |