The data_pgs command includes an optional parameter, dbid. You must re-create any stored procedures that use data_pgs.
The new syntax is:
data_pgs([dbid], object_id, {data_oam_pg_id | index_oam_pg_id}
Where:
dbid – is the dbid of the database that contains the data pages.
The definitions for object_id, data_oam_pg_id, and index_oam_pg_id are in the Reference Manual.
For example:
select o.name, Pages = data_pgs(4,i.id, i.doampg) from pubs2..sysindexes i, pubs2.sysobjects o where i.id = o.id and i.id > 100 and (indid = 1 or indid = 0)
For more information about the data_pgs command, see the Reference Manual.