Applies to all databases. syspartitions contains one row for each data partition and one row for each index partition.
Each table partition. indid is 0.
Each clustered index partition. indid is 1.
Each nonclustered index partition. indid is >1.
Each single-partitioned (unpartitioned) table.
Each single-partitioned (unpartitioned) clustered or nonclustered index.
If an index is local, the value for partitionid (data partition row) and data_partitionid (associated index row) are the same. If the index is not local, the value for data_partitionid (index row) is zero (0), and it does not equal that for partitionid (data partition row).
The columns for syspartitions are:
Name |
Datatype |
Description |
---|---|---|
name |
varchar(255) |
Partition name. |
indid |
smallint |
on an allpages-locked table Index ID. Values are:
|
id |
int |
Table ID. |
partitionid |
int |
ID of data or index partition. |
segment |
smallint |
ID of segment on which partition resides. |
status |
int |
Internal status information. |
datoampage |
unsigned int |
Page number for the object allocation map of a data partition. |
indoampage |
unsigned int |
Page number of the object allocation map of an index partition. |
firstpage |
unsigned int |
Page number of the first data or leaf page. |
rootpage |
unsigned int |
Page number of:
|
data_partitionid |
int |
ID of data partition this index spans.
Values are:
|
crdate |
datetime |
Date the partition created. |
cdataptnname |
varchar(255) null |
Name of data partition. |
lobcomp_lvl |
tinyint |
LOB compression level |
ptndcompver |
tinyint |
Version of datacompression algorithm used |
Unique clustered index on id, indid, partitionid
Unique nonclustered index on id, indid, name
Unique nonclustered index on partitionid, indid