Re: database space info (fwd)
Posted in 1997
The best way is to add up all of the extents that are in that database.
However,
oncheck -pe does not automatically do this.
I'm sure that you are aware that there is a difference in the number of
pages allocated to a tablespace and the number of pages actually in use.
If the number of pages in use is sufficient, then you could do the
following:
database <xxxxx>
update statistics low;select sum(npused) from systables;
You can get information about the number of pages allocated from
sysmasters database, but I can't remember right now which table it is.
However, in order to know which database the table belongs to, you will
have to join against the partnums from the systables for that database.
This is the same information that you would get from oncheck -pt <table>
Madison Pruet