Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

sp_helprole (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

Returns information about the roles in the current database.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

Topic link icon Transact-SQL Syntax Conventions

sp_helprole [ [ @rolename = ] 'role' ]

[ @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.

0 (success) or 1 (failure)

Column name

Data type




Name of the role in the current database.



ID of RoleName.



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.

Requires membership in the public role.

The following query returns all the roles in the current database.

EXEC sp_helprole
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft