Previous Topic

Next Topic

Inhoudsopgave

Book Index

Reserved_pgs

reserved_pgs( object_id, {doampg | ioampg} )

Returns the number of pages allocated to table or index.

Examples

select name, indid, reserved_pgs( id, doampg ) -- doampg is for the table

from sysindexes

where Id = Object_Id('T_ProdBillOfMat')

and IndId < 2 -- 0 is the unsorted table, 1 is a clustered index

Select name, indid, reserved_pgs( id, ioampg ) -- ioampg is for the index

from sysindexes

where Id = Object_Id('T_ProdBillOfMat')

and IndId > 1 -- IndId = 255 is the text page chain