系统表 (Transact-SQL)System Tables (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

本节中的主题介绍 SQL ServerSQL Server 中的系统表。The topics in this section describe the system tables in SQL ServerSQL Server.

任何用户都不应直接更改系统表。The system tables should not be changed directly by any user. 例如,不要尝试使用 DELETE、UPDATE、INSERT 语句或用户定义的触发器修改系统表。For example, do not try to modify system tables with DELETE, UPDATE, or INSERT statements, or user-defined triggers.

允许在系统表中引用所记录的列。Referencing documented columns in system tables is permissible. 然而,系统表中的许多列都未被记录。However, many of the columns in system tables are not documented. 不应编写应用程序直接查询未记录的列。Applications should not be written to directly query undocumented columns. 相反,若要检索存储在系统表中的信息,应用程序应使用下列组件之一:Instead, to retrieve information stored in the system tables, applications should use any one of the following components:

  • 系统存储过程System stored procedures

  • Transact-SQLTransact-SQL 语句和函数statements and functions

  • SQL ServerSQL Server 管理对象 (SMO)Management Objects (SMO)

  • 复制管理对象 (RMO)Replication Management Objects (RMO)

  • 数据库 API 目录函数Database API catalog functions

这些组件构成一个已发布的 API,用以从 SQL ServerSQL Server 获取系统信息。These components make up a published API for obtaining system information from SQL ServerSQL Server. MicrosoftMicrosoft 维护这些组件在不同版本间的兼容性。maintains the compatibility of these components from release to release. 系统表的格式取决于 SQL ServerSQL Server 的内部体系结构,并且可能因不同的版本而异。The format of the system tables depends upon the internal architecture of SQL ServerSQL Server and may change from release to release. 因此,直接访问系统表中未记录列的应用程序可能需要进行更改,然后才能访问 SQL ServerSQL Server 的更高版本。Therefore, applications that directly access the undocumented columns of system tables may have to be changed before they can access a later version of SQL ServerSQL Server.

本节内容In This Section

系统表主题按下列功能范围进行组织:The system table topics are organized by the following feature areas:

另请参阅See Also

Transact-sql)的兼容性视图 ( Compatibility Views (Transact-SQL)
目录视图 (Transact-SQL)Catalog Views (Transact-SQL)