Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to:
SQL Server
Reports information about Windows groups with accounts in the current database.
Transact-SQL syntax conventions
sp_helpntgroup [ [ @ntname = ] N'ntname' ]
[ ; ]
The name of the Windows group. @ntname is sysname, with a default of NULL
. @ntname must be a valid Windows group with access to the current database. If @ntname isn't specified, all Windows groups with access to the current database are included in the output.
0
(success) or 1
(failure).
Column name | Data type | Description |
---|---|---|
NTGroupName |
sysname | Name of the Windows group. |
NTGroupId |
smallint | Group identifier (ID). |
SID |
varbinary(85) | Security identifier (SID) of NTGroupName . |
HasDbAccess |
int | 1 = Windows group has permission to access the database. |
To see a list of the SQL Server roles in the current database, use sp_helprole
.
Requires membership in the public role.
The following example prints a list of the Windows groups with access to the current database.
EXEC sp_helpntgroup;