sys.sysusers (Transact-SQL)

 

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Contains one row for each Microsoft Windows user, Windows group, Microsoft SQL Server user, or SQL Server role in the database.

System_CAPS_ICON_important.jpg Important


This SQL Server 2000 system table is included as a view for backward compatibility. We recommend that you use the current SQL Server system views instead. To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Column nameData typeDescription
uidsmallintUser ID, unique in this database.

1 = Database owner

Overflows or returns NULL if the number of users and roles exceeds 32,767.
statussmallintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.
namesysnameUser name or group name, unique in this database.
sidvarbinary(85)Security identifier for this entry.
rolesvarbinary(2048)Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
createdatedatetimeDate the account was added.
updatedatedatetimeDate the account was last changed.
altuidsmallintIdentified for informational purposes only. Not supported. Future compatibility is not guaranteed.

Overflows or returns NULL if the number of users and roles exceeds 32,767.
passwordvarbinary(256)Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.
gidsmallintGroup 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.
environvarchar(255)Reserved.
hasdbaccessint1 = Account has database access.
isloginint1 = Account is a Windows group, Windows user, or SQL Server user with a login account.
isntnameint1 = Account is a Windows group or Windows user.
isntgroupint1 = Account is a Windows group.
isntuserint1 = Account is a Windows user.
issqluserint1 = Account is a SQL Server user.
isaliasedint1 = Account is aliased to another user.
issqlroleint1 = Account is a SQL Server role.
isapproleint1 = Account is an application role.

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

Community Additions

ADD
Show: