sys.sysusers (Transact-SQL)sys.sysusers (Transact-SQL)
适用于:Applies to: SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
Azure SQL 托管实例Azure SQL Managed Instance
Azure SQL 托管实例Azure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
并行数据仓库Parallel Data Warehouse
并行数据仓库Parallel Data Warehouse适用于:Applies to:
SQL ServerSQL Server(所有支持的版本)
SQL ServerSQL Server (all supported versions)
Azure SQL 托管实例Azure SQL Managed Instance
Azure SQL 托管实例Azure SQL Managed Instance
Azure Synapse AnalyticsAzure Synapse Analytics
Azure Synapse AnalyticsAzure Synapse Analytics
并行数据仓库Parallel Data Warehouse
并行数据仓库Parallel Data Warehouse
对于数据库中的每个 MicrosoftMicrosoft windows 用户、windows 组、 MicrosoftMicrosoft SQL ServerSQL Server 用户或 SQL ServerSQL Server 角色占一行。Contains one row for each MicrosoftMicrosoft Windows user, Windows group, MicrosoftMicrosoft SQL ServerSQL Server user, or SQL ServerSQL Server role in the database.
重要
将此 SQL Server 2000 系统表作为一个视图包含进来是为了保持向后兼容性。This SQL Server 2000 system table is included as a view for backward compatibility. 建议您改用当前的 SQL Server 系统视图。We recommend that you use the current SQL Server system views instead. 若要查找一个或多个等效系统视图,请参阅将系统表映射到系统视图 (Transact-SQL)。To find the equivalent system view or views, see Mapping System Tables to System Views (Transact-SQL). 后续版本的 Microsoft SQL Server 将删除该功能。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 name | 数据类型Data type | 说明Description |
---|---|---|
uiduid | smallintsmallint | 用户 ID,在此数据库中是唯一的。User ID, unique in this database. 1 = 数据库所有者1 = Database owner 如果用户数和角色数超过 32,767,则发生溢出或返回 NULL。Overflows or returns NULL if the number of users and roles exceeds 32,767. |
statusstatus | smallintsmallint | 标识为仅供参考。Identified for informational purposes only. 不支持。Not supported. 不保证以后的兼容性。Future compatibility is not guaranteed. |
namename | sysnamesysname | 用户名或组名,在此数据库中是唯一的。User name or group name, unique in this database. |
sidsid | varbinary(85)varbinary(85) | 此项的安全性标识符。Security identifier for this entry. |
作用roles | varbinary(2048)varbinary(2048) | 标识为仅供参考。Identified for informational purposes only. 不支持。Not supported. 不保证以后的兼容性。Future compatibility is not guaranteed. |
createdatecreatedate | datetimedatetime | 帐户的添加日期。Date the account was added. |
updatedateupdatedate | datetimedatetime | 帐户的上次更改日期。Date the account was last changed. |
altuidaltuid | smallintsmallint | 标识为仅供参考。Identified for informational purposes only. 不支持。Not supported. 不保证以后的兼容性。Future compatibility is not guaranteed. 如果用户数和角色数超过 32,767,则发生溢出或返回 NULL。Overflows or returns NULL if the number of users and roles exceeds 32,767. |
passwordpassword | varbinary(256)varbinary(256) | 标识为仅供参考。Identified for informational purposes only. 不支持。Not supported. 不保证以后的兼容性。Future compatibility is not guaranteed. |
gidgid | smallintsmallint | 此用户所属的组 ID。Group ID to which this user belongs. 如果 uid 与 gid 相同,则此项定义一个组。If uid is the same as gid, this entry defines a group. 如果组和用户的总数超过 32,767,则发生溢出或返回 NULL。Overflows or returns NULL if the combined number of groups and users exceeds 32,767. |
environenviron | varchar(255)varchar(255) | 保留。Reserved. |
hasdbaccesshasdbaccess | intint | 1 = 帐户具有数据库访问权。1 = Account has database access. |
isloginislogin | intint | 1 = 帐户是具有登录帐户的 Windows 组、Windows 用户或 SQL ServerSQL Server 用户。1 = Account is a Windows group, Windows user, or SQL ServerSQL Server user with a login account. |
isntnameisntname | intint | 1 = 帐户是 Windows 组或 Windows 用户。1 = Account is a Windows group or Windows user. |
isntgroupisntgroup | intint | 1 = 帐户是 Windows 组。1 = Account is a Windows group. |
isntuserisntuser | intint | 1 = 帐户是 Windows 用户。1 = Account is a Windows user. |
issqluserissqluser | intint | 1 = 帐户是 SQL ServerSQL Server 用户。1 = Account is a SQL ServerSQL Server user. |
isaliasedisaliased | intint | 1 = 帐户化名为另一个用户。1 = Account is aliased to another user. |
issqlroleissqlrole | intint | 1 = 帐户是 SQL ServerSQL Server 角色。1 = Account is a SQL ServerSQL Server role. |
isapproleisapprole | intint | 1 = 帐户是应用程序角色。1 = Account is an application role. |
另请参阅See Also
将系统表映射到系统视图 (Transact-sql) Mapping System Tables to System Views (Transact-SQL)
兼容性视图 (Transact SQL)Compatibility Views (Transact-SQL)