ptn_data_pgs

Description

Returns the number of data pages used by a partition.

Syntax

ptn_data_pgs(object_id, partition_id)

Parameters

object_id

is the object ID for a table, stored in the id column of sysobjects, sysindexes, and syspartitions.

partition_id

is the partition number of a table.

Examples

Example 1

select ptn_data_pgs(object_id("salesdetail"), 1)

----------- 
          5

Usage

Standards

SQL92 – Compliance level: Transact-SQL extension.

Permissions

Only the table owner can execute ptn_data_pgs.

See also

Commands update partition statistics, dbcc

Functions data_pgs, object_id

System procedures sp_helpartition