sp_srvrolepermission

Transact-SQL Reference

Transact-SQL Reference

sp_srvrolepermission

Returns the permissions applied to a fixed server role.

Syntax

sp_srvrolepermission [[@srvrolename =] 'role']

Arguments

[@srvrolename =] 'role'

Is the name of the fixed server role for which permissions are returned. role is sysname, with a default of NULL. If not specified, the permissions for all fixed server roles are returned. role can be one of these values.

Value 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
Return Code Values

0 (success) or 1 (failure)

Result Sets
Column name Data type Description
ServerRole sysname Name of a fixed server role
Permission sysname Permission associated with ServerRole

Remarks

The permissions applied to members of fixed server roles are managed internally and are not part of the security system used to manage the permissions for the other types of security accounts.

The permissions listed include the Transact-SQL statements that can be executed, as well as other special activities performed by members of the fixed server role. To display a list of the fixed server roles, execute sp_helpsrvrole.

The sysadmin fixed server role has the permissions of all the other fixed server roles.

Permissions

Execute permissions default to the public role.

Examples

This example displays the permissions associated with the sysadmin fixed server role.

EXEC sp_srvrolepermission 'sysadmin'

See Also

sp_addsrvrolemember

sp_dropsrvrolemember

sp_helpsrvrole

System Stored Procedures