Applies To: SQL Server 2014, SQL Server 2016 Preview
Reports information about Windows groups with accounts in the current database.
Applies to: SQL Server (SQL Server 2008 through current version).
- [ @ntname = ] 'name'
Is the name of the Windows group. name is sysname, with a default of NULL. name must be a valid Windows group with access to the current database. If name is not specified, all Windows groups with access to the current database are included in the output.
0 (success) or 1 (failure)
Name of the Windows group.
Group identifier (ID).
Security identifier (SID) of NTGroupName.
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.