sys.partitions (Transact-SQL)

Contains a row for each partition of all the tables and indexes in the database. All tables and indexes in SQL Server 2005 are considered to contain at least one partition, even if they are not explicitly partitioned.

Column name Data type Description

partition_id

bigint

ID of the partition. Is unique within a database.

object_id

int

ID of the object to which this partition belongs. Every table or view is comprised of at least one partition.

index_id

int

ID of the index within the object to which this partition belongs.

partition_number

int

1-based partition number within the owning index or heap. For nonpartitioned tables and indexes, the value of this column is 1.

hobt_id

bigint

ID of the data heap or B-tree that contains the rows for this partition.

rows

bigint

Approximate number of rows in this partition.

See Also

Reference

Object Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)

Other Resources

Querying the SQL Server System Catalog FAQ

Help and Information

Getting SQL Server 2005 Assistance