sp_addgroup

Description

Adds a group to a database. Groups are used as collective names in granting and revoking privileges.

Syntax

sp_addgroup grpname

Parameters

grpname

is the name of the group. Group names must conform to the rules for identifiers.

Examples

Example 1

Creates a group named accounting in the current database:

sp_addgroup accounting

Usage

Permissions

Only the database owner, a system administrator, or a system security officer can execute sp_addgroup.

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_adduser, sp_changegroup, sp_dropgroup, sp_helpgroup