Reports information about Microsoft® Windows NT® groups with accounts in the current database.
sp_helpntgroup [ [ @ntname = ] 'name' ]
[@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).
0 (success) or 1 (failure)
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. |
To see a list of the Microsoft SQL Server™ roles in the current database, use sp_helprole.
Execute permissions default to the public role.
This example prints a list of the Windows NT groups in the current database.
EXEC sp_helpntgroup