Provides a list of local Microsoft® Windows NT® groups or a list of global groups defined in a specified Windows NT domain.
xp_enumgroups ['domain_name']
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
group | sysname | Name of the Windows NT group |
comment | sysname | Description of the Windows NT group provided by Windows NT |
If domain_name is the name of the Windows NT-based computer that Microsoft SQL Server™ is running on, or no domain name is specified, xp_enumgroups enumerates the local groups from the computer running SQL Server.
xp_enumgroups cannot be used when SQL Server is running on Windows® 95/98.
Execute permissions for xp_enumgroups default to members of the sysadmin fixed server role but can be granted to other users.
This example lists the groups in the sales domain.
EXEC xp_enumgroups 'sales'
sp_grantlogin | xp_logininfo |
sp_revokelogin | System Stored Procedures (General Extended Procedures) |
xp_loginconfig |