sys.system_objects (Transact-SQL)sys.system_objects (Transact-SQL)

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

包含所有結構描述範圍系統物件所包含的一個資料列MicrosoftMicrosoft SQL ServerSQL ServerContains one row for all schema-scoped system objects that are included with MicrosoftMicrosoft SQL ServerSQL Server. 所有系統物件都包含在名稱為 sys 或 INFORMATION_SCHEMA 的結構描述中。All system objects are contained in the schemas named sys or INFORMATION_SCHEMA.

資料行名稱Column name 資料類型Data type 描述Description
namename sysnamesysname 物件名稱。Object name.
object_idobject_id intint 物件識別碼。Object identification number. 在資料庫中,這是唯一的。Is unique within a database.
principal_idprincipal_id intint 如果個別擁有者不是結構描述擁有者,這便是個別擁有者的識別碼。ID of the individual owner if different from the schema owner. 依預設,結構描述包含的物件就是結構描述擁有者所擁有的物件。By default, schema-contained objects are owned by the schema owner. 不過,您也可以利用 ALTER AUTHORIZATION 陳述式來變更擁有權,指定另一個擁有者。However, another owner can be specified by using the ALTER AUTHORIZATION statement to change ownership.

如果沒有其他個別擁有者,便是 NULL。Is NULL if there is no other individual owner.

如果物件類型是下列其中一項,便是 NULL:Is NULL if the object type is one of the following:

C = CHECK 條件約束C = CHECK constraint

D = DEFAULT (條件約束或獨立式)D = DEFAULT (constraint or stand-alone)

F = FOREIGN KEY 條件約束F = FOREIGN KEY constraint

PK = PRIMARY KEY 條件約束PK = PRIMARY KEY constraint

R = 規則 (舊式、獨立式)R = Rule (old-style, stand-alone)

TA = 組件 (CLR) 觸發程序TA = Assembly (CLR) trigger

TR = SQL 觸發程序TR = SQL trigger

UQ = UNIQUE 條件約束UQ = UNIQUE constraint
schema_idschema_id intint 物件所在的結構描述識別碼。ID of the schema that the object is contained in.

對於 SQL ServerSQL Server 所包括的所有結構描述範圍系統物件而言,這個值一律會在 (schema_id('sys'), schema_id('INFORMATION_SCHEMA')) 中For all schema-scoped system objects that included with SQL ServerSQL Server, this value will always be in (schema_id('sys'), schema_id('INFORMATION_SCHEMA'))
parent_object_idparent_object_id intint 這個物件所屬的物件識別碼。ID of the object to which this object belongs.

0 = 不是子物件。0 = Not a child object.
typetype char(2)char(2) 物件類型:Object type:

AF = 彙總函式 (CLR)AF = Aggregate function (CLR)

C = CHECK 條件約束C = CHECK constraint

D = DEFAULT (條件約束或獨立式)D = DEFAULT (constraint or stand-alone)

F = FOREIGN KEY 條件約束F = FOREIGN KEY constraint

FN = SQL 純量函數FN = SQL scalar function

FS = 組件 (CLR) 純量函數FS = Assembly (CLR) scalar-function

FT = 組件 (CLR) 資料表值函式FT = Assembly (CLR) table-valued function

IF = SQL 嵌入資料表值函式IF = SQL inline table-valued function

IT = 內部資料表IT = Internal table

P = SQL 預存程序P = SQL Stored Procedure

PC = 組件 (CLR) 預存程序PC = Assembly (CLR) stored-procedure

PG = 計畫指南PG = Plan guide

PK = PRIMARY KEY 條件約束PK = PRIMARY KEY constraint

R = 規則 (舊式、獨立式)R = Rule (old-style, stand-alone)

RF = 複寫篩選程序RF = Replication-filter-procedure

S = 系統基底資料表S = System base table

SN = 同義字SN = Synonym

SQ = 服務佇列SQ = Service queue

TA = 組件 (CLR) DML 觸發程序TA = Assembly (CLR) DML trigger

TF = SQL 資料表值函式TF = SQL table-valued-function

TR = SQL DML 觸發程序TR = SQL DML trigger

TT = 資料表類型TT = Table type

U = 資料表 (使用者定義)U = Table (user-defined)

UQ = UNIQUE 條件約束UQ = UNIQUE constraint

V = 檢視V = View

X = 擴充預存程序X = Extended stored procedure
type_desctype_desc nvarchar(60)nvarchar(60) 物件類型的描述。Description of the object type. AGGREGATE_FUNCTIONAGGREGATE_FUNCTION

























create_datecreate_date datetimedatetime 物件的建立日期。Date the object was created.
modify_datemodify_date datetimedatetime 上次利用 ALTER 陳述式來修改物件的日期。Date the object was last modified by using an ALTER statement. 如果物件是資料表或檢視,當建立或變更資料表或檢視的叢集索引時,也會變更 modify_date。If the object is a table or a view, modify_date also changes when a clustered index on the table or view is created or altered.
is_ms_shippedis_ms_shipped bitbit 物件由內部MicrosoftMicrosoftSQL ServerSQL Server元件。Object is created by an internal MicrosoftMicrosoft SQL ServerSQL Server component.
is_publishedis_published bitbit 已發行物件。Object is published.
is_schema_publishedis_schema_published bitbit 僅發行物件的結構描述。Only the schema of the object is published.


目錄檢視內中繼資料的可見性會限制在使用者所擁有的安全性實體,或已授與使用者某些權限的安全性實體。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. 如需相關資訊,請參閱 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另請參閱See Also

目錄檢視 (Transact-SQL) Catalog Views (Transact-SQL)
物件目錄檢視(Transact SQL)Object Catalog Views (Transact-SQL)