Export (0) Print
Expand All
Expand Minimize

sp_helprole

SQL Server 2000

Returns information about the roles in the current database.

Syntax

sp_helprole [ [ @rolename = ] 'role' ]

Arguments

[@rolename =] 'role'

Is the name of a role in the current database. role is sysname, with a default of NULL. role must exist in the current database. If role is not specified, information about all roles in the current database is returned.

Return Code Values

0 (success) or 1 (failure)

Result Sets
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.

Remarks

To view the permissions associated with the role, use sp_helprotect.

To view the members of a database role, use sp_helprolemember.

Permissions

Execute permissions default to the public role.

Examples

This example displays all the roles in the current database.

EXEC sp_helprole

See Also

sp_addapprole

sp_addrole

sp_droprole

sp_helprolemember

sp_helpsrvrolemember

System Stored Procedures

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft