Skip to content

Latest commit

 

History

History
68 lines (62 loc) · 3.68 KB

File metadata and controls

68 lines (62 loc) · 3.68 KB

title: "sys.sysusers (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "03/15/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-data-warehouse, pdw" ms.service: "" ms.component: "system-compatibility-views" ms.reviewer: "" ms.suite: "sql" ms.technology:

  • "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords:
  • "sys.sysusers"
  • "sys.sysusers_TSQL"
  • "sysusers_TSQL"
  • "sysusers" dev_langs:
  • "TSQL" helpviewer_keywords:
  • "sysusers system table"
  • "sys.sysusers compatibility view" ms.assetid: 5f0e6a8d-c983-44f6-97e9-aab5bff67d18 caps.latest.revision: 36 author: "rothja" ms.author: "jroth" manager: "craigg" ms.workload: "On Demand" monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions"

sys.sysusers (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-asdw-pdw-md]

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)