Reduce TIM DB Storage


Recon's and other activities in TIM will fill up your itim db. You can minimize recons by using a delta approach at the TDI layer (showing you only what's changed). But often you have to purge old records. This is a two part process; the purge command on the ITIM websphere server, and the db2 reduce commands

Purging Old Records

Put a script in the cron.daily folder similar to the one below. The arguments are important, especially the -threads 1 argument, without which, the purge often fails. (this was from a PMR with ibm)

[gattis@was2 ~]$ cat /etc/cron.daily/was_db_purge 
/opt/IBM/itim/bin/unix/ -threads 1 -age 180 -grouping 10 > /dev/null 2>&1

Reducing DB2 Extentents

After you've purged the DB, you will have some free pages in your various tablespaces. You will have to list them with details, and hunt for ones you can reduce. In some cases, even though there are free pages, the reduce command will be unable to operate because of the structure inside the tablespace and you will have to take the system off line to lower the high water mark with a runstats, reorg or db2dart

connect to itimdb
list tablespaces with detail
alter tablespace reduce USERSPACE1
# (notice the high water mark is reduced by 10000)
alter tablespace reduce USERSPACE1 (all containers 10000)