Skip to content

Latest commit

 

History

History
57 lines (51 loc) · 3.36 KB

File metadata and controls

57 lines (51 loc) · 3.36 KB
title sys.sysusers (Transact-SQL)
description sys.sysusers (Transact-SQL)
author rwestMSFT
ms.author randolphwest
ms.date 03/15/2017
ms.service sql
ms.subservice system-objects
ms.topic reference
f1_keywords
sys.sysusers
sys.sysusers_TSQL
sysusers_TSQL
sysusers
helpviewer_keywords
sysusers system table
sys.sysusers compatibility view
dev_langs
TSQL
monikerRange >=aps-pdw-2016||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current||=fabric

sys.sysusers (Transact-SQL)

[!INCLUDE sql-asdbmi-asa-pdw-fabricse-fabricdw]

Contains one row for each [!INCLUDEmsCoName] Windows user, Windows group, [!INCLUDEmsCoName] [!INCLUDEssNoVersion] user, or [!INCLUDEssNoVersion] role in the database.

Important

[!INCLUDEssnoteCompView]

Column name Data type Description
uid smallint User ID, unique in this database.

1 = Database owner

Overflows or returns NULL if the number of users and roles exceeds 32,767.
status smallint [!INCLUDEssInternalOnly]
name sysname User name or group name, unique in this database.
sid varbinary(85) Security identifier for this entry.
roles varbinary(2048) [!INCLUDEssInternalOnly]
createdate datetime Date the account was added.
updatedate datetime Date the account was last changed.
altuid smallint [!INCLUDEssInternalOnly]

Overflows or returns NULL if the number of users and roles exceeds 32,767.
password varbinary(256) [!INCLUDEssInternalOnly]
gid smallint Group ID to which this user belongs. If uid is the same as gid, this entry defines a group. Overflows or returns NULL if the combined number of groups and users exceeds 32,767.
environ varchar(255) Reserved.
hasdbaccess int 1 = Account has database access.
islogin int 1 = Account is a Windows group, Windows user, or [!INCLUDEssNoVersion] user with a login account.
isntname int 1 = Account is a Windows group or Windows user.
isntgroup int 1 = Account is a Windows group.
isntuser int 1 = Account is a Windows user.
issqluser int 1 = Account is a [!INCLUDEssNoVersion] user.
isaliased int 1 = Account is aliased to another user.
issqlrole int 1 = Account is a [!INCLUDEssNoVersion] role.
isapprole int 1 = Account is an application role.

See Also

Mapping System Tables to System Views (Transact-SQL)
Compatibility Views (Transact-SQL)