sp_helpgroup

Reports information about a particular group or about all groups in the current database.

Syntax

sp_helpgroup [grpname]

Parameters

Examples

Usage

To get a report on the default group, “public,” enclose the name “public” in single or double quotes (“public” is a reserved word).

If there are no members in the specified group, sp_helpgroup displays the header, but lists no users, as follows:

Group_name            Group_id          Users_in_group          Userid 
-----------           ---------         --------------          ------

See also grant, revoke in Reference Manual: Commands.

Permissions

Any user can execute sp_helpgroup. Permission checks do not differ based on the granular permissions settings.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_addgroup
sp_changegroup
sp_dropgroup
sp_helprotect
sp_helpuser