Reports information about a role or all roles in the current database. This procedure is included for backward compatibility. Microsoft® SQL Server™ version 7.0 uses roles instead of groups. Use sp_helprole.
sp_helpgroup [[@grpname =] 'role']
0 (success) or 1 (failure)
role is not specified.
Column name | Data type | Description |
---|---|---|
Group_name | sysname | Name of the role in the current database |
Group_id | smallint | Role ID for the role in the current database |
role is specified.
Column name | Data type | Description |
---|---|---|
Group_name | sysname | Name of the role in the current database |
Group_id | smallint | Role ID for the role in the current database |
Users_in_group | sysname | Member of the role in the current database |
Userid | smallint | User ID for the member of the role |
To view the permissions associated with the role, use sp_helprotect.
Execute permissions default to the public role.
This example returns information about the hackers role.
EXEC sp_helpgroup 'hackers'
This example returns information about all roles in the current database.
EXEC sp_helpgroup
sp_helprotect | sp_helpuser |
sp_helprole | System Stored Procedures |