sp_spaceused (Transact-SQL)sp_spaceused (Transact-SQL)

適用於: 是SQL Server (從 2012 開始) 是Azure SQL Database 是Azure SQL 資料倉儲 是平行處理資料倉儲 APPLIES TO: yesSQL Server (starting with 2012) yesAzure SQL Database yesAzure SQL Data Warehouse yesParallel Data Warehouse

顯示資料列的數目、所保留的磁碟空間和資料表所用的磁碟空間、索引檢視,或目前資料庫中的 Service BrokerService Broker 佇列,或顯示整個資料庫所保留和使用的磁碟空間。Displays the number of rows, disk space reserved, and disk space used by a table, indexed view, or Service BrokerService Broker queue in the current database, or displays the disk space reserved and used by the whole database.

主題連結圖示 Transact-SQL 語法慣例Topic link icon Transact-SQL Syntax Conventions

語法Syntax

sp_spaceused [[ @objname = ] 'objname' ]   
[, [ @updateusage = ] 'updateusage' ]  
[, [ @mode = ] 'mode' ]  
[, [ @oneresultset = ] oneresultset ]  
[, [ @include_total_xtp_storage = ] include_total_xtp_storage ]

引數Arguments

針對SQL 資料倉儲SQL Data Warehouse平行處理資料倉儲Parallel Data Warehousesp_spaceused必須指定具名的參數 (例如sp_spaceused (@objname= N'Table1');而不是依賴參數的序數位置。For SQL 資料倉儲SQL Data Warehouse and 平行處理資料倉儲Parallel Data Warehouse, sp_spaceused must specify named parameters (for example sp_spaceused (@objname= N'Table1'); rather than relying upon the ordinal position of parameters.

[ @objname = ] 'objname'

這是要求的空間使用方式資訊所屬之資料表、索引檢視或佇列的完整或非完整名稱。Is the qualified or nonqualified name of the table, indexed view, or queue for which space usage information is requested. 只有在指定完整物件名稱時,才會需要引號。Quotation marks are required only if a qualified object name is specified. 如果提供完整物件名稱 (包括資料庫名稱),資料庫名稱就必須是目前資料庫的名稱。If a fully qualified object name (including a database name) is provided, the database name must be the name of the current database.
如果objname未指定,整個資料庫會傳回結果。If objname is not specified, results are returned for the whole database.
objnamenvarchar(776),預設值是 NULL。objname is nvarchar(776), with a default of NULL.

注意

SQL 資料倉儲SQL Data Warehouse 平行處理資料倉儲Parallel Data Warehouse僅支援資料庫和資料表的物件。and 平行處理資料倉儲Parallel Data Warehouse only support database and table objects.

[ @updateusage = ] 'updateusage' 指出應該執行 DBCC UPDATEUSAGE 來更新空間使用方式資訊。[ @updateusage = ] 'updateusage' Indicates DBCC UPDATEUSAGE should be run to update space usage information. objname是未指定,整個資料庫上執行此陳述式; 此陳述式上的執行,否則為objnameWhen objname is not specified, the statement is run on the whole database; otherwise, the statement is run on objname. 值可以是或是falseValues can be true or false. updateusagevarchar(5),預設值是falseupdateusage is varchar(5), with a default of false.

[ @mode = ] 'mode' 表示結果的範圍。[ @mode = ] 'mode' Indicates the scope of the results. 延展的資料表或資料庫,如模式參數可讓您包含或排除物件中的遠端的一部分。For a stretched table or database, the mode parameter lets you include or exclude the remote portion of the object. 如需詳細資訊,請參閱 Stretch DatabaseFor more info, see Stretch Database.

模式引數可以是下列值:The mode argument can have the following values:

Value 描述Description
ALLALL 傳回儲存體的統計資料物件或資料庫包括本機部分和遠端的部分。Returns the storage statistics of the object or database including both the local portion and the remote portion.
LOCAL_ONLYLOCAL_ONLY 傳回儲存體的統計資料的本機部分的物件或資料庫。Returns the storage statistics of only the local portion of the object or database. 如果物件或資料庫不是已啟用延展功能,會傳回相同的統計資料時一樣,因此@mode= ALL。If the object or database is not Stretch-enabled, returns the same statistics as when @mode = ALL.
REMOTE_ONLYREMOTE_ONLY 傳回遠端部份的物件或資料庫的儲存體統計資料。Returns the storage statistics of only the remote portion of the object or database. 當下列條件之一成立時,此選項就會引發錯誤:This option raises an error when one of the following conditions is true:

未啟用 Stretch 的資料表。The table is not enabled for Stretch.

資料表已啟用延展功能,但您永遠不會啟用資料移轉。The table is enabled for Stretch, but you have never enabled data migration. 在此情況下,遠端資料表還沒有結構描述。In this case, the remote table does not yet have a schema.

使用者已手動卸除遠端資料表。The user has manually dropped the remote table.

遠端資料封存的佈建傳回的狀態為成功,但事實上它失敗。The provisioning of the remote data archive returned a status of Success, but in fact it failed.

模式varchar(11),預設值是N'ALL'mode is varchar(11), with a default of N'ALL'.

[ @oneresultset = ] oneresultset 指出是否要傳回單一結果集。[ @oneresultset = ] oneresultset Indicates whether to return a single result set. Oneresultset引數可以是下列值:The oneresultset argument can have the following values:

Value 描述Description
00 當*@objname*為 null 或未指定,會傳回兩個結果集。When *@objname* is null or is not specified, two result sets are returned. 兩個結果集是預設行為。Two result sets is the default behavior.
11 當*@objname* = null 或未指定,會傳回單一結果集。When *@objname* = null or is not specified, a single result set is returned.

oneresultset位元,預設值是0oneresultset is bit, with a default of 0.

[ @include_total_xtp_storage] 'include_total_xtp_storage' 適用於: SQL Server 2017 (14.x)SQL Server 2017 (14.x)SQL DatabaseSQL Database[ @include_total_xtp_storage] 'include_total_xtp_storage' Applies to: SQL Server 2017 (14.x)SQL Server 2017 (14.x), SQL DatabaseSQL Database.

當@oneresultset= 1,參數@include_total_xtp_storage決定單一結果集是否包含 MEMORY_OPTIMIZED_DATA 儲存體的資料行。When @oneresultset=1, the parameter @include_total_xtp_storage determines whether the single resultset includes columns for MEMORY_OPTIMIZED_DATA storage. 預設值為 0,也就是預設 (如果省略此參數) 的 XTP 資料行不包含在結果集。The default value is 0, that is, by default (if the parameter is omitted) the XTP columns are not included in the resultset.

傳回碼值Return Code Values

0 (成功) 或 1 (失敗)0 (success) or 1 (failure)

結果集Result Sets

如果objname省略,而oneresultset是 0,則會傳回下列結果集提供目前的資料庫大小資訊。If objname is omitted and the value of oneresultset is 0, the following result sets are returned to provide current database size information.

資料行名稱Column name 資料類型Data type 描述Description
database_namedatabase_name nvarchar(128)nvarchar(128) 目前資料庫的名稱。Name of the current database.
database_sizedatabase_size varchar(18)varchar(18) 目前資料庫的大小 (以 MB 為單位)。Size of the current database in megabytes. database_size包含資料和記錄檔。database_size includes both data and log files.
未配置的空間unallocated space varchar(18)varchar(18) 資料庫中尚未保留給資料庫物件的空間。Space in the database that has not been reserved for database objects.
資料行名稱Column name 資料類型Data type 描述Description
reservedreserved varchar(18)varchar(18) 資料庫中的物件所配置的空間總量。Total amount of space allocated by objects in the database.
datadata varchar(18)varchar(18) 資料所用的空間總量。Total amount of space used by data.
index_sizeindex_size varchar(18)varchar(18) 索引所用的空間總量。Total amount of space used by indexes.
未使用unused varchar(18)varchar(18) 保留給資料庫中之物件但尚未使用的空間總量。Total amount of space reserved for objects in the database, but not yet used.

如果objname省略,而oneresultset為 1,下列的單一結果集傳回以目前的資料庫大小資訊。If objname is omitted and the value of oneresultset is 1, the following single result set is returned to provide current database size information.

資料行名稱Column name 資料類型Data type 描述Description
database_namedatabase_name nvarchar(128)nvarchar(128) 目前資料庫的名稱。Name of the current database.
database_sizedatabase_size varchar(18)varchar(18) 目前資料庫的大小 (以 MB 為單位)。Size of the current database in megabytes. database_size包含資料和記錄檔。database_size includes both data and log files.
未配置的空間unallocated space varchar(18)varchar(18) 資料庫中尚未保留給資料庫物件的空間。Space in the database that has not been reserved for database objects.
reservedreserved varchar(18)varchar(18) 資料庫中的物件所配置的空間總量。Total amount of space allocated by objects in the database.
datadata varchar(18)varchar(18) 資料所用的空間總量。Total amount of space used by data.
index_sizeindex_size varchar(18)varchar(18) 索引所用的空間總量。Total amount of space used by indexes.
未使用unused varchar(18)varchar(18) 保留給資料庫中之物件但尚未使用的空間總量。Total amount of space reserved for objects in the database, but not yet used.

如果objname指定,則指定的物件傳回下列結果集。If objname is specified, the following result set is returned for the specified object.

資料行名稱Column name 資料類型Data type 描述Description
namename nvarchar(128)nvarchar(128) 要求的空間使用方式資訊所屬的物件名稱。Name of the object for which space usage information was requested.

不會傳回物件的結構描述名稱。The schema name of the object is not returned. 如果需要的結構描述名稱,使用sys.dm_db_partition_stats或是sys.dm_db_index_physical_stats動態管理檢視來取得對等的大小資訊。If the schema name is required, use the sys.dm_db_partition_stats or sys.dm_db_index_physical_stats dynamic management views to obtain equivalent size information.
rowsrows char(20)char(20) 資料表現有的資料列數。Number of rows existing in the table. 如果指定的物件是一個 Service BrokerService Broker 佇列,這個資料行會指出佇列中的訊息數目。If the object specified is a Service BrokerService Broker queue, this column indicates the number of messages in the queue.
reservedreserved varchar(18)varchar(18) 保留空間的總量objnameTotal amount of reserved space for objname.
datadata varchar(18)varchar(18) 中的資料所使用的空間總量objnameTotal amount of space used by data in objname.
index_sizeindex_size varchar(18)varchar(18) 中的索引所使用的空間總量objnameTotal amount of space used by indexes in objname.
未使用unused varchar(18)varchar(18) 為保留的空間總量objname但尚未使用。Total amount of space reserved for objname but not yet used.

當未不指定任何參數時,這是預設的模式。This is the default mode, when no parameters are specified. 下列結果集傳回詳列出的磁碟上的資料庫大小資訊。The following result sets are returned detailing on-disk database size information.

資料行名稱Column name 資料類型Data type 描述Description
database_namedatabase_name nvarchar(128)nvarchar(128) 目前資料庫的名稱。Name of the current database.
database_sizedatabase_size varchar(18)varchar(18) 目前資料庫的大小 (以 MB 為單位)。Size of the current database in megabytes. database_size包含資料和記錄檔。database_size includes both data and log files. 如果資料庫具有 MEMORY_OPTIMIZED_DATA 檔案群組,這會包括檔案群組中的所有檢查點檔案的磁碟大小總計。If the database has a MEMORY_OPTIMIZED_DATA filegroup, this includes the total on-disk size of all checkpoint files in the filegroup.
未配置的空間unallocated space varchar(18)varchar(18) 資料庫中尚未保留給資料庫物件的空間。Space in the database that has not been reserved for database objects. 如果資料庫具有 MEMORY_OPTIMIZED_DATA 檔案群組,這會包括檔案群組中的狀態預先建立的檢查點檔案的磁碟大小總計。If the database has a MEMORY_OPTIMIZED_DATA filegroup, this includes the total on-disk size of the checkpoint files with state PRECREATED in the filegroup.

在資料庫中的資料表所使用的空間: (此結果集不會反映記憶體最佳化的資料表,因為不沒有磁碟使用量的任何資料表每個計量)Space used by tables in the database: (this resultset does not reflect memory-optimized tables, as there is no per-table accounting of disk usage)

資料行名稱Column name 資料類型Data type 描述Description
reservedreserved varchar(18)varchar(18) 資料庫中的物件所配置的空間總量。Total amount of space allocated by objects in the database.
datadata varchar(18)varchar(18) 資料所用的空間總量。Total amount of space used by data.
index_sizeindex_size varchar(18)varchar(18) 索引所用的空間總量。Total amount of space used by indexes.
未使用unused varchar(18)varchar(18) 保留給資料庫中之物件但尚未使用的空間總量。Total amount of space reserved for objects in the database, but not yet used.

會傳回下列結果集只有當資料庫具有 MEMORY_OPTIMIZED_DATA 檔案群組與至少一個容器:The following result set is returned ONLY IF the database has a MEMORY_OPTIMIZED_DATA filegroup with at least one container:

資料行名稱Column name 資料類型Data type 描述Description
xtp_precreatedxtp_precreated varchar(18)varchar(18) 使用預先建立,以 kb 為單位的狀態的檢查點檔案的大小總計。Total size of checkpoint files with state PRECREATED, in KB. 項目會計整個資料庫中的未配置空間。Counts towards the unallocated space in the database as a whole. [比方說,如果沒有 600,000 KB 的預先建立的檢查點檔案,此資料行包含 ' 600000 KB'][For example, if there is 600,000 KB of precreated checkpoint files, this column contains '600000 KB']
xtp_usedxtp_used varchar(18)varchar(18) 建構、 使用中及合併的目標,以 kb 為單位的狀態的檢查點檔案的大小總計。Total size of checkpoint files with states UNDER CONSTRUCTION, ACTIVE, and MERGE TARGET, in KB. 這是目前正在使用中記憶體最佳化資料表的資料的磁碟空間。This is the disk space actively used for data in memory-optimized tables.
xtp_pending_truncationxtp_pending_truncation varchar(18)varchar(18) 檢查點檔案狀態 WAITING_FOR_LOG_TRUNCATION,以 kb 為單位的大小總計。Total size of checkpoint files with state WAITING_FOR_LOG_TRUNCATION, in KB. 這是正在等待清除,之後會截斷記錄檔, 的檢查點檔案使用的磁碟空間。This is the disk space used for checkpoint files that are awaiting cleanup, once log truncation happens.

如果objname已省略,oneresultset 的值為 1,並include_total_xtp_storage為 1,下列的單一結果集傳回以目前的資料庫大小資訊。If objname is omitted, the value of oneresultset is 1, and include_total_xtp_storage is 1, the following single result set is returned to provide current database size information. 如果include_total_xtp_storage是 0 (預設值),則會省略的最後三個資料行。If include_total_xtp_storage is 0 (the default), the last three columns are omitted.

資料行名稱Column name 資料類型Data type 描述Description
database_namedatabase_name nvarchar(128)nvarchar(128) 目前資料庫的名稱。Name of the current database.
database_sizedatabase_size varchar(18)varchar(18) 目前資料庫的大小 (以 MB 為單位)。Size of the current database in megabytes. database_size包含資料和記錄檔。database_size includes both data and log files. 如果資料庫具有 MEMORY_OPTIMIZED_DATA 檔案群組,這會包括檔案群組中的所有檢查點檔案的磁碟大小總計。If the database has a MEMORY_OPTIMIZED_DATA filegroup, this includes the total on-disk size of all checkpoint files in the filegroup.
未配置的空間unallocated space varchar(18)varchar(18) 資料庫中尚未保留給資料庫物件的空間。Space in the database that has not been reserved for database objects. 如果資料庫具有 MEMORY_OPTIMIZED_DATA 檔案群組,這會包括檔案群組中的狀態預先建立的檢查點檔案的磁碟大小總計。If the database has a MEMORY_OPTIMIZED_DATA filegroup, this includes the total on-disk size of the checkpoint files with state PRECREATED in the filegroup.
reservedreserved varchar(18)varchar(18) 資料庫中的物件所配置的空間總量。Total amount of space allocated by objects in the database.
datadata varchar(18)varchar(18) 資料所用的空間總量。Total amount of space used by data.
index_sizeindex_size varchar(18)varchar(18) 索引所用的空間總量。Total amount of space used by indexes.
未使用unused varchar(18)varchar(18) 保留給資料庫中之物件但尚未使用的空間總量。Total amount of space reserved for objects in the database, but not yet used.
xtp_precreatedxtp_precreated varchar(18)varchar(18) 使用預先建立,以 kb 為單位的狀態的檢查點檔案的大小總計。Total size of checkpoint files with state PRECREATED, in KB. 這整個會計入在資料庫中的未配置空間。This counts towards the unallocated space in the database as a whole. 如果資料庫沒有 memory_optimized_data 檔案群組與至少一個容器,則傳回 NULL。Returns NULL if the database does not have a memory_optimized_data filegroup with at least one container. 此資料行只會包含的若@include_total_xtp_storage= 1*This column is only included if @include_total_xtp_storage=1*.
xtp_usedxtp_used varchar(18)varchar(18) 建構、 使用中及合併的目標,以 kb 為單位的狀態的檢查點檔案的大小總計。Total size of checkpoint files with states UNDER CONSTRUCTION, ACTIVE, and MERGE TARGET, in KB. 這是目前正在使用中記憶體最佳化資料表的資料的磁碟空間。This is the disk space actively used for data in memory-optimized tables. 如果資料庫沒有 memory_optimized_data 檔案群組與至少一個容器,則傳回 NULL。Returns NULL if the database does not have a memory_optimized_data filegroup with at least one container. 此資料行只會包含的若@include_total_xtp_storage= 1*This column is only included if @include_total_xtp_storage=1*.
xtp_pending_truncationxtp_pending_truncation varchar(18)varchar(18) 檢查點檔案狀態 WAITING_FOR_LOG_TRUNCATION,以 kb 為單位的大小總計。Total size of checkpoint files with state WAITING_FOR_LOG_TRUNCATION, in KB. 這是正在等待清除,之後會截斷記錄檔, 的檢查點檔案使用的磁碟空間。This is the disk space used for checkpoint files that are awaiting cleanup, once log truncation happens. 如果資料庫沒有 memory_optimized_data 檔案群組與至少一個容器,則傳回 NULL。Returns NULL if the database does not have a memory_optimized_data filegroup with at least one container. 這個資料行是只包含的如果@include_total_xtp_storage=1This column is only included if @include_total_xtp_storage=1.

備註Remarks

database_size一律大於設定的總和保留 + 未配置空間因為它包含的記錄檔大小,但保留unallocated_space只考量資料頁。database_size is always larger than the sum of reserved + unallocated space because it includes the size of log files, but reserved and unallocated_space consider only data pages.

XML 索引和全文檢索索引所使用的頁面都會納入index_size兩個結果集。Pages that are used by XML indexes and full-text indexes are included in index_size for both result sets. objname指定時,XML 索引和全文檢索索引之物件的頁面也會列入計算總保留index_size結果。When objname is specified, the pages for the XML indexes and full-text indexes for the object are also counted in the total reserved and index_size results.

如果資料庫或物件,例如具有空間索引的空間大小資料行中,計算空間使用量database_size保留,並index_size,包括空間索引的大小。If space usage is calculated for a database or an object that has a spatial index, the space-size columns, such as database_size, reserved, and index_size, include the size of the spatial index.

updateusage指定,則SQL Server Database EngineSQL Server Database Engine掃描的資料在資料庫中的分頁,並可讓任何所需的更正sys.allocation_unitssys.partitions目錄檢視有關每個資料表使用的儲存空間。When updateusage is specified, the SQL Server Database EngineSQL Server Database Engine scans the data pages in the database and makes any required corrections to the sys.allocation_units and sys.partitions catalog views regarding the storage space used by each table. 例如,在某些狀況下,在卸除索引之後,資料表的空間資訊可能不是目前的資訊。There are some situations, for example, after an index is dropped, when the space information for the table may not be current. updateusage可能需要一些時間才能在大型資料表或資料庫上執行。updateusage can take some time to run on large tables or databases. 使用updateusage只當您懷疑所傳回的不正確的值,而當程序不會造成不良的影響其他使用者或處理資料庫中。Use updateusage only when you suspect incorrect values are being returned and when the process will not have an adverse effect on other users or processes in the database. 如果願意的話,您可以個別執行 DBCC UPDATEUSAGE。If preferred, DBCC UPDATEUSAGE can be run separately.

注意

當您卸除或重建大型索引時,或卸除或截斷大型資料表時,Database EngineDatabase Engine 會延遲取消配置實際的頁面及其相關聯鎖定,直到認可交易之後。When you drop or rebuild large indexes, or drop or truncate large tables, the Database EngineDatabase Engine defers the actual page deallocations, and their associated locks, until after the transaction commits. 延遲的卸除作業並不會立即釋出已配置的空間。Deferred drop operations do not release allocated space immediately. 因此,所傳回的值sp_spaceused之後立即卸除或截斷大型物件可能無法反映實際的磁碟可用空間。Therefore, the values returned by sp_spaceused immediately after dropping or truncating a large object may not reflect the actual disk space available.

PermissionsPermissions

執行 sp_spaceused 的權限會授與 public 角色。Permission to execute sp_spaceused is granted to the public role. 只有 db_owner 固定資料庫角色的成員,才能夠指定 **@updateusage** 參數。Only members of the db_owner fixed database role can specify the **@updateusage** parameter.

範例Examples

A.A. 顯示資料表的相關磁碟空間資訊Displaying disk space information about a table

下列範例會報告 Vendor 資料表及其索引的磁碟空間資訊。The following example reports disk space information for the Vendor table and its indexes.

USE AdventureWorks2012;  
GO  
EXEC sp_spaceused N'Purchasing.Vendor';  
GO  

B.B. 顯示資料庫的相關更新空間資訊Displaying updated space information about a database

下列範例會摘要目前資料庫所用的空間,並利用選擇性參數 @updateusage 來確定會傳回目前的值。The following example summarizes space used in the current database and uses the optional parameter @updateusage to ensure current values are returned.

USE AdventureWorks008R2;  
GO  
EXEC sp_spaceused @updateusage = N'TRUE';  
GO  

C.C. 顯示遠端資料表的空間使用狀況資訊相關聯的已啟用 Stretch 的資料表Displaying space usage information about the remote table associated with a Stretch-enabled table

下列範例會摘要說明使用已啟用 Stretch 的資料表與關聯之遠端資料表所用的空間**@mode**引數來指定遠端目標。The following example summarizes the space used by the remote table associated with a Stretch-enabled table by using the **@mode** argument to specify the remote target. 如需詳細資訊,請參閱 Stretch DatabaseFor more info, see Stretch Database.

USE StretchedAdventureWorks2016  
GO  
EXEC sp_spaceused N'Purchasing.Vendor', @mode = 'REMOTE_ONLY'  

D.D. 顯示資料庫的空間使用量資訊中,將單一結果集Displaying space usage information for a database in a single result set

下列範例會摘要說明目前的資料庫,在單一結果集的空間使用量。The following example summarizes space usage for the current database in a single result set.

USE AdventureWorks2016  
GO  
EXEC sp_spaceused @oneresultset = 1  

E.E. 顯示單一結果集內的資料庫與至少一個記憶體最佳化檔案群組的空間使用方式資訊Displaying space usage information for a database with at least one MEMORY_OPTIMIZED file group in a single result set

下列範例會摘要說明單一結果集中至少一個記憶體最佳化檔案群組的目前資料庫的空間使用量。The following example summarizes space usage for the current database with at least one MEMORY_OPTIMIZED file group in a single result set.

USE WideWorldImporters
GO
EXEC sp_spaceused @updateusage = 'FALSE', @mode = 'ALL', @oneresultset = '1', @include_total_xtp_storage = '1';
GO

F.F. 顯示資料庫中的 MEMORY_OPTIMIZED 資料表物件的空間使用量資訊。Displaying space usage information for a MEMORY_OPTIMIZED table object in a database.

下列範例會摘要說明 MEMORY_OPTIMIZED 資料表物件目前的資料庫與至少一個記憶體最佳化檔案群組中的空間使用量。The following example summarizes space usage for a MEMORY_OPTIMIZED table object in the current database with at least one MEMORY_OPTIMIZED file group.

USE WideWorldImporters
GO
EXEC sp_spaceused
@objname = N'VehicleTemparatures',
@updateusage = 'FALSE',
@mode = 'ALL',
@oneresultset = '0',
@include_total_xtp_storage = '1';
GO

另請參閱See Also

CREATE INDEX (Transact-SQL) CREATE INDEX (Transact-SQL)
CREATE TABLE (Transact-SQL) CREATE TABLE (Transact-SQL)
DBCC UPDATEUSAGE (Transact-SQL) DBCC UPDATEUSAGE (Transact-SQL)
SQL Server Service Broker SQL Server Service Broker
sys.allocation_units (Transact-SQL) sys.allocation_units (Transact-SQL)
sys.indexes (Transact-SQL) sys.indexes (Transact-SQL)
sys.index_columns (Transact-SQL) sys.index_columns (Transact-SQL)
sys.objects (Transact-SQL) sys.objects (Transact-SQL)
sys.partitions (Transact-SQL) sys.partitions (Transact-SQL)
系統預存程序 (Transact-SQL)System Stored Procedures (Transact-SQL)