sp_dropgroup

Description

Drops a group from a database.

Syntax

sp_dropgroup grpname

Parameters

grpname

is the name of a group in the current database.

Examples

Example 1

The “purchasing” group has merged with the “accounting” group. These commands move “martha” and “george”, members of the “purchasing” group, to other groups before dropping the group. The group name “public” is quoted because “public” is a reserved word:

sp_changegroup accounting, martha 
sp_changegroup "public", george 
sp_dropgroup purchasing

Usage

Permissions

Only the Database Owner, a System Administrator, or a System Security Officer can execute sp_dropgroup.

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

System procedures sp_addgroup, sp_changegroup, sp_helpgroup