Re: How to get dbspace for a table???
Posted in 1994
I am a relative novice at OnLine, since most of my experience is with SE.
However, I have used the following select to get dbspace info for tables:
select tabname, trunc(partnum / 16777216) dbspace
from systables;
This gives the dbspace number directly, and is a little easier to read
than interpreting the hex value of 'partnum'.
Now are you are willing to add a table to your database and load it with
dbspace numbers and names taken from tbstat -D? Such as:
create table dbspace
( dbs_no smallint,
dbs_name char(18)
);
Having loaded such a table, I have been able to do this:
select tabname, dbs_name
from systables, dbspace
where dbs_no = trunc(partnum / 16777216);
My environment:
ISQL 4.11.UC1
OnLine 5.00.UC2
HP-UX 8.00 on a 9000/350
It sounds like this may no longer be necessary with version 6.xx and above,
having been replaced by the sysmaster database. Jonathon, are table and
dbspace names both available in the sysmaster database? Or is it necessary
to combine info from the application database with info from sysmaster?
Regards,
Alan ___________________________
______________________| R. Alan Popiel |__________________________
\\ Internet: | Martin Marietta, SLS | /
\\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. /
)Voice: | Denver, CO 80201-0179 USA | (
/ 303-977-9998 |___________________________| (But you knew that!) \\
/________________________) (____________________________\\