Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize


SQL Server 2000

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']



Is the name of the Windows NT domain for which to enumerate a list of global groups. domain_name is sysname, with a default of NULL.

Return Code Values

0 (success) or 1 (failure)

Result Sets
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® 98.


Execute permissions for xp_enumgroups default to members of the db_owner fixed database role in the master database and 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'

See Also



System Stored Procedures (General Extended Procedures)



Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft