Reports information about Microsoft® Windows NT® groups with accounts in the current database.
sp_helpntgroup [[@ntname =] 'name']
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
| sp_grantdbaccess | sp_revokedbaccess |
| sp_helprole | System Stored Procedures |