Returns information about the roles in the current database.
sp_helprole [[@rolename =] 'role']
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
RoleName | sysname | Name of the role in the current database. |
RoleId | smallint | ID of RoleName. |
IsAppRole | int | 0 = RoleName is not an application role. 1 = RoleName is an application role. |
To view the permissions associated with the role, use sp_helprotect.
To view the members of a database role, use sp_helprolemember.
Execute permissions default to the public role.
This example displays all the roles in the current database.
EXEC sp_helprole
sp_addapprole | sp_helprolemember |
sp_addrole | sp_helpsrvrolemember |
sp_droprole | System Stored Procedures |