1.How can we find out in which dbspaces my table resides.
You can use either the utility oncheck -pe to get the information of all the
tables and indexes
or you can use the sysmaster tables
echo "output to tabext without headings select
b.tabname,d.name,fextsize,nextsize,lockle
vel from systabextents a,(databasename):systables b,syschktab c,sysdbstab d
where a.te_partnum=b.p
artnum and b.tabid > 99 and physchunk(te_physaddr) = c.chknum and c.dbsnum =
d.dbsnum "
|dbaccess sysmaster 2>&1 2>/dev/null
2. How can I find out which users are using "test" database- where
there are multiple databases in a instance.
you can monitor this using your onstat -g sql
or
echo "select username,sqs_dbname from syssessions a , syssqlstat b where
a.sid=b.sqs_sessionid"|dbaccess sysmaster
SR
↪ replying to Radhika
Radhika wrote:
[snip]
> 2. How can I find out which users are using "test" database- where
> there are multiple databases in a instance.
> you can monitor this using your onstat -g sql
>
> or
> echo "select username,sqs_dbname from syssessions a , syssqlstat b where
> a.sid=b.sqs_sessionid"|dbaccess sysmaster
Just my standard warning. Doing either of these on a busy engine on an
SMP system with multiple CPU VPs MAY create a never ending query that will
eventually gobble up all available resources in the engine and force you
to shutdown and restart. BEWARE. Smaller systems need not worry.
Art S. Kagel