List tables per dbspace
Posted in 2000
Topics: Storage & Space Management
I am trying to generate a list of the Informix tables per each dbspace. My sysfragments table only contains the indexes. I have dbspaces that are filling up and am trying determine which tables could possibly be moved to another dbspace (while still being aware of application contention possibilities). Sue sathey@bepc.com
Sue Athey wrote in message <87v42i$mtn$1@republic.btigate.com>...
>I am trying to generate a list of the Informix tables per each dbspace. My
>sysfragments table only contains the indexes. I have dbspaces that are
>filling up and am trying determine which tables could possibly be moved to
>another dbspace (while still being aware of application contention
>possibilities).
>
>Sue
>sathey@bepc.com
>
>
#!/usr/bin/ksh
#top 40 tables (fragments, etc...)
pagek=2
dbaccess sysmaster 2>/dev/null <<EOF
select first 40 a.tabname, round(sum((b.npused*$pagek)/1024)) mb_used
from systabnames a, sysptnhdr b
where a.partnum = b.partnum
group by 1
order by 2 descEOF
Sue Athey wrote in message <87v42i$mtn$1@republic.btigate.com>...
>I am trying to generate a list of the Informix tables per each dbspace. My
>sysfragments table only contains the indexes. I have dbspaces that are
>filling up and am trying determine which tables could possibly be moved to
>another dbspace (while still being aware of application contention
>possibilities).
>
>Sue
>sathey@bepc.com
>
>
#!/usr/bin/ksh
#top 40 partitions (tblspaces -- individual fragments, seperated indexes,
etc...)
pagek=2
dbaccess sysmaster 2>/dev/null <<EOF
select first 40 dbinfo('DBSPACE',a.partnum), a.tabname,round((b.npused*$pagek)/1024) mb_used
from systabnames a, sysptnhdr b
where a.partnum = b.partnum
order by 3 desc, 2 asc
EOF