sp_dropgroup

Drops a group from a database.

Syntax

sp_dropgroup grpname

Parameters

Examples

Usage

Executing sp_dropgroup drops a group name from a database’s sysusers table.

You cannot drop a group if it has members. To drop the group, execute sp_changegroup for each member first.

Permissions

The permission checks for sp_dropgroup differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage any user privilege.

Disabled

With granular permissions disabled, you must be the database owner, a user with sa_role , or a user with sso_role.

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_helpgroup