Transact-SQL Reference

xp_enumgroups

Provides a list of local Microsoft® Windows NT® groups or a list of global groups defined in a specified Windows NT domain.

Syntax

xp_enumgroups ['domain_name']

Arguments

'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

Remarks

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.

Permissions

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.

Examples

This example lists the groups in the sales domain.

EXEC xp_enumgroups 'sales'

See Also

sp_grantlogin

sp_revokelogin

System Stored Procedures (General Extended Procedures)

xp_loginconfig

xp_logininfo

'

Comments ( )
Link to this page: //www.vb-net.com/Sql/Sql/Ts_xp_aa-sz_2t4j.htm
< THANKS ME>