Trace R Jones wrote:
> anyway to sort by USED when doing a LIST TABLESPACES SHOW DETAIL?
It would probably be easier to use a query, than to try to sort chunks
of lines. For example:
SELECT substr(TABLESPACE_NAME,1, 18) as TABLESPACE_NAME,
((USED_PAGES * 100) / TOTAL_PAGES) as PERC_USED
FROM table (snapshot_tbs_CFG(cast(null as varchar(20)), -2 )) as x
ORDER by PERC_USED desc
TABLESPACE_NAME PERC_USED
------------------ --------------------
SYSCATSPACE 100
USERSPACE1 100
TS_USERTEMP 100
TS_SYSTEMP_4K 100
TS_SYSTEMP_32K 100
TS_SUM 75
TS_FACT 72
TS_INDEXES 3
TS_DIM 2
One of the ways that we monitor our databases is to wrap a query like
this in python. Then the python script checks for each tablespace on
each server every hour. Any tablespace with a perc_used over a
threshold in a config file will generate an email.
ken
DB2 & UDB email list listserv db2-l LazyDBA home page