系統資料表 (Transact-SQL)System Tables (Transact-SQL)

適用於: 是SQL Server 否Azure SQL Database 否Azure SQL 資料倉儲 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

本章節的主題介紹 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)

  • Replication Management Objects (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:

備份與還原資料表(Transact SQL)Backup and Restore Tables (Transact-SQL) 記錄傳送資料表 (Transact-SQL)Log Shipping Tables (Transact-SQL)
變更資料擷取資料表(Transact SQL)Change Data Capture Tables (Transact-SQL) 複寫資料表 (Transact-SQL)Replication Tables (Transact-SQL)
資料庫維護計畫資料表(Transact SQL)Database Maintenance Plan Tables (Transact-SQL) SQL Server Agent 資料表(Transact SQL)SQL Server Agent Tables (Transact-SQL)
SQL Server 擴充事件目錄資料表(Transact SQL)SQL Server Extended Events Tables (Transact-SQL) sys.sysoledbusers (Transact SQL)sys.sysoledbusers (Transact-SQL)
Integration Services 資料表(Transact SQL)Integration Services Tables (Transact-SQL) systranschemas (Transact-SQL)systranschemas (Transact-SQL)

另請參閱See Also

相容性檢視(Transact SQL) Compatibility Views (Transact-SQL)
目錄檢視 (Transact-SQL)Catalog Views (Transact-SQL)