Udostępnij za pośrednictwem


sp_helpntgroup (Transact-SQL)

Reports information about Windows groups with accounts in the current database.

Ikona łącza do tematu Transact-SQL Syntax Conventions

Składnia

sp_helpntgroup [ [ @ntname= ] 'name' ] 

Arguments

  • [ @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.

Return Code Values

0 (success) or 1 (failure)

Result Sets

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.

Uwagi

To see a list of the SQL Server roles in the current database, use sp_helprole.

Permissions

Requires membership in the public role.

Examples

The following example prints a list of the Windows groups with access to the current database.

EXEC sp_helpntgroup

Zobacz także

Odwołanie

Security Stored Procedures (Transact-SQL)

sp_grantdbaccess (Transact-SQL)

sp_helprole (Transact-SQL)

sp_revokedbaccess (Transact-SQL)

System Stored Procedures (Transact-SQL)