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

適用於: 是SQL Server 是Azure SQL Database 是Azure Synapse Analytics (SQL DW) 是平行處理資料倉儲 APPLIES TO: yesSQL Server yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) 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時,會在整個資料庫上執行語句;否則,語句會在objname上執行。When objname is not specified, the statement is run on the whole database; otherwise, the statement is run on objname. 值可以是truefalseValues 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. 針對延展的資料表或資料庫, mode參數可讓您包含或排除物件的遠端部分。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.

Mode引數可以有下列值: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. 如果物件或資料庫未啟用 Stretch,會傳回與 @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.

modeVarchar (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.

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

[ @include_total_xtp_storage] 'include_total_xtp_storage' @ no__t-1適用于: 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
reserved 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.
reserved 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. 如果需要架構名稱,請使用_db_partition_stats_db_index_physical_stats動態管理 views 來取得對等的大小資訊。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.
reserved varchar(18)varchar(18) Objname保留空間的總數量。Total amount of reserved space for objname.
datadata varchar(18)varchar(18) Objname中的資料所使用的總空間量。Total amount of space used by data in objname.
index_sizeindex_size varchar(18)varchar(18) Objname中的索引所使用的空間總量。Total 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
reserved 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. [例如,如果有 600000 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.
reserved 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=1 時,才會包含這個資料行。This column is only included if @include_total_xtp_storage=1.

備註Remarks

database_size一律會大於保留的 @no__t 2未配置空間的總和,因為它包含記錄檔的大小,但是reservedunallocated_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_sizereservedindex_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 會掃描資料庫中的資料頁,並針對每個資料表所使用的儲存空間,對allocation_unitssys.databases目錄檢視進行任何必要的更正。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. 只有當您懷疑傳回不正確的值,以及當進程對資料庫中的其他使用者或處理常式不會有負面影響時,才使用updateusageUse 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固定資料庫角色的成員,才能夠指定 @no__t 2updateusage參數。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

下列範例會使用 @no__t 1mode引數來指定遠端目標,以摘要說明與已啟用 Stretch 之資料表相關聯的遠端資料表所使用的空間。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. 在單一結果集中顯示至少有一個 MEMORY_OPTIMIZED 檔案群組之資料庫的空間使用量資訊Displaying space usage information for a database with at least one MEMORY_OPTIMIZED file group in a single result set

下列範例會使用單一結果集中至少一個 MEMORY_OPTIMIZED 檔案群組,摘要說明目前資料庫的空間使用量。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 檔案群組,摘要說明目前資料庫中 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)