Try this shell script to see it might help.
#db2uspace userdb
-----------------------------------
#!/bin/ksh
if [ $# -ne 1 ]; then
print "Usage: db2uspace <db>"
exit 1
fi
db2 connect to $1
x=1
Avaia=/var/tmp/avaials$$
blabla=/var/tmp/blabla$$
#trap 'rm $Avaia $blabla; exit 1' 0 1 2 15
trap 'rm $Avaia $blabla; exit 1' EXIT HUP INT TERM
db2 "list tablespaces show detail" | egrep -i "id|used|name" | awk -F" " '{print $NF}' > $Avaia
for i in $(<$Avaia)
{
echo $i' ' "\c" >> $blabla
if (((x%=3) == 0)); then
echo >> $blabla
fi
((x=x+1))
}
{
while read tbid namesp spused; do
print "Tablespace id = "$tbid
print " tablespace name = "$namesp
db2 "list tablespace containers for $tbid show detail" | egrep -i "name|total|useable"
print " *** Used Pages *** = "$spused
echo
done
} < $blabla
De:"Sitaram Guruswamy" sitaram.[Email Address Removed] discussion mailing list (E-mail)" [Email Address Removed] 17 Mar 2004 12:43:20 -0500
Assunto:tablespace container usage
This is probably a rotfm question, but here goes anyway...
my DMS tablespaces use files. I have a table space that uses two files. I want to see how much of these files has actually been used by my data (a system ls -ls is, of course, useless). I want to know this so I know whether to create more files. 'list tablespace container for..." doesn't show me that info. Any suggestions?
Esta mensagem foi verificada pelo E-mail Protegido Terra.
Scan engine: VirusScan / Atualizado em 15/03/2004 / Versão: 1.5.2
Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
DB2 & UDB email list listserv db2-l LazyDBA home page