sys.data_spaces (Transact-SQL)sys.data_spaces (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance 是Azure Synapse AnalyticsAzure Synapse AnalyticsyesAzure Synapse AnalyticsAzure Synapse Analytics 是并行数据仓库Parallel Data Warehouseyes并行数据仓库Parallel Data Warehouse

每个数据空间在表中对应一行。Contains a row for each data space. 数据空间可以是文件组、分区方案或 FILESTREAM 数据文件组。This can be a filegroup, partition scheme, or FILESTREAM data filegroup.

列名称Column name 数据类型Data type 说明Description
namename sysnamesysname 数据空间的名称,在数据库中唯一。Name of data space, unique within the database.
data_space_iddata_space_id intint 数据空间 ID 号,在数据库中唯一。Data space ID number, unique within the database.
类型type char(2)char(2) 数据空间类型:Data space type:

FG = 文件组FG = Filegroup

FD = FILESTREAM 数据文件组FD = FILESTREAM data filegroup

FX = 内存优化表文件组FX = Memory-optimized tables filegroup

适用于SQL Server 2014 (12.x)SQL Server 2014 (12.x) 及更高版本。Applies to: SQL Server 2014 (12.x)SQL Server 2014 (12.x) and later.

PS = 分区方案PS = Partition scheme
type_desctype_desc nvarchar(60)nvarchar(60) 数据空间类型的说明:Description of data space type:

FILESTREAM_DATA_FILEGROUPFILESTREAM_DATA_FILEGROUP

MEMORY_OPTIMIZED_DATA_FILEGROUPMEMORY_OPTIMIZED_DATA_FILEGROUP

适用于SQL Server 2014 (12.x)SQL Server 2014 (12.x) 及更高版本。Applies to: SQL Server 2014 (12.x)SQL Server 2014 (12.x) and later.

PARTITION_SCHEMEPARTITION_SCHEME

ROWS_FILEGROUPROWS_FILEGROUP
is_defaultis_default bitbit 1 = 这是默认数据空间。1 = This is the default data space. 如果在 CREATE TABLE 或 CREATE INDEX 语句中没有指定文件组或分区方案,将使用默认数据空间。The default data space is used when a filegroup or partition scheme is not specified in a CREATE TABLE or CREATE INDEX statement.

0 = 这不是默认数据空间。0 = This is not the default data space.
is_systemis_system bitbit 适用于SQL Server 2012 (11.x)SQL Server 2012 (11.x) 及更高版本。Applies to: SQL Server 2012 (11.x)SQL Server 2012 (11.x) and later.

1 = 数据空间用于全文检索片段。1 = Data space is used for full-text index fragments.

0 = 数据空间不用于全文检索片段。0 = Data space is not used for full-text index fragments.

权限Permissions

要求具有 public 角色的成员身份。Requires membership in the public role. 有关详细信息,请参阅 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另请参阅See Also

数据空间 (Transact-sql) Data Spaces (Transact-SQL)
目录视图 (Transact-SQL) Catalog Views (Transact-SQL)
sys.databases (Transact-SQL) sys.databases (Transact-SQL)
sys.destination_data_spaces (Transact-SQL) sys.destination_data_spaces (Transact-SQL)
sys.filegroups (Transact-SQL) sys.filegroups (Transact-SQL)
sys.partition_schemes (Transact-SQL) sys.partition_schemes (Transact-SQL)
查询 SQL Server 系统目录常见问题 Querying the SQL Server System Catalog FAQ
内存中 OLTP(内存中优化)In-Memory OLTP (In-Memory Optimization)