sp_helpgroup

Description

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

Syntax

sp_helpgroup [grpname]

Parameters

grpname

is the name of a group in the database created with sp_addgroup.

Examples

Example 1

Displays information about all groups in the current database:

sp_helpgroup
Group_name           Group_id 
---------------      --------
hackers              16384
public                0

Example 2

Displays information about the group “hackers”:

sp_helpgroup hackers
Group_name      Group_id      Users_in_group      Userid
-----------     ---------     --------------      ------ 
hackers         16384         ann                 4 
hackers         16384         judy                3 

Usage

Permissions

Any user can execute sp_helpgroup.

Auditing

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

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • 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

See also

Commands grant, revoke

System procedures sp_addgroup, sp_changegroup, sp_dropgroup, sp_helprotect, sp_helpuser