sp_helpntgroup
Reports information about Microsoft® Windows NT® groups with accounts in the current database.
Syntax
sp_helpntgroup [ [ @ntname = ] 'name' ]
Arguments
[@ntname =] 'name'
Is the name of the Windows NT group. name is sysname, with a default of NULL. name must be a valid Windows NT group in the current database. If name is not specified, all Windows NT groups in the current database are included in the output. Specify the name that the Windows NT group is known by in the database (added using sp_grantdbaccess).
Return Code Values
0 (success) or 1 (failure)
Result Sets
Column name | Data type | Description |
---|---|---|
NTGroupName | sysname | Name of the Windows NT group. |
NTGroupId | smallint | Group ID. |
SID | varbinary(85) | Security identifier of NTGroupName. |
HasDbAccess | int | 1 = Windows NT group has permission access to the database. |
Remarks
To see a list of the Microsoft SQL Server™ roles in the current database, use sp_helprole.
Permissions
Execute permissions default to the public role.
Examples
This example prints a list of the Windows NT groups in the current database.
EXEC sp_helpntgroup