Reports information about a particular group or about all groups in the current database.
sp_helpgroup [grpname]
is the name of a group in the database created with sp_addgroup.
Displays information about all groups in the current database:
sp_helpgroup
Group_name Group_id --------------- -------- hackers 16384 public 0
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
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 ----------- --------- -------------- ------
Any user can execute sp_helpgroup.
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 |
|
System procedures sp_addgroup, sp_changegroup, sp_dropgroup, sp_helprotect, sp_helpuser