Re: Q: Another how to question
Posted in 1998
Just want to clarify, in case we've all managed to completely confuse the poor
person who originally asked the question...
> > > select tabname,> > > trunc(partnum/16777216) dbspace
> > > from systables where tabid >100;
> >
> > As far as I know, it should be >99;
Correct, this should be >99. This one works on OnLine 4.x and 5.x, but not on
any higher versions.
> > select tabname,
> > dbinfo('dbspace', partnum) dbspace
> > from systables
> > where tabid > 99 and tabtype = 'T' and partnum != 0
> > union all
> > select tabname,
> > dbspace dbspace
> > from systables t, outer sysfragments f
> > where t.tabid > 99 and
> > tabtype = 'T' and
> > partnum = 0 and
> > t.tabid = f.tabid
> > order by 1,2;>
Only works on versions 7 and above. Takes into account fragmented tables.
> database sysmaster;>
> select dbs.dbsnum, dbs.name, prof.dbsname,
> prof.tabname, prof.partnum
> from sysdbspaces dbs, outer sysptprof prof
> where dbs.dbsnum = trunc(hex(prof.partnum)/1048576)
> order by 1, 4;
Also only works on 6 & above (might be 7 & above), doesn't take into account
fragmented tables. Incidentally, if you're dividing and truncating, you don't
need to do the conversion to hex:
where dbs.dbsnum = trunc(prof.partnum/1048576)
should work.
June
--
june_t@hotmail.com
Lost in the wilds of Palo Alto, living on sushi