sp_srvrolepermission (T-SQL)

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

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 that can be 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_helpsrvrole
sp_dropsrvrolemember System Stored Procedures

  


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