Quote:
|
Originally Posted by stolze
There are a lot of information that we don't know:[*] is this the only table in the tablespace? (other tables could occupy space)
|
No, there are several hundred tables in the tablespace, most are empty or close to empty. The largest has just had all it's rows deleted (7.5Mil) but the space doesn't seem to be freeing up.
Quote:
|
[*] what kind of tablespace is that? (DMS tablespaces have things like a free space map)
|
It's a DMS but the difference in space is far too large to be a mere overhead.
Quote:
|
[*] have you run RUNSTATS recently? (if not, then the values in SYSCAT.TABLES may just be outdated)
|
Runstats has been run very recently.
Quote:
|
[*] was the table reorganized? (that would free up empty pages again)
|
That's the problem, reorgs are
not freeing up the space as I would have thought.
This problem has occurred on several systems now. I have managed to free up the space with the following procedure:
1. Rows deleted
2. Runstats on all tables in tablespace
3. Reorg all tables in tablespace
(this does not free up space)
4. Disconnect all application (I really don't want to do this on the production systems)
5. db2dart <DBID> /lhwm (giving the tablespace ID and 0 as the params)
This suggests a reorg with no access using the longlobdata option
6. Grep the output to get the tablenames in order
7. Create/run reorg statements based on the grep output (for some reason it only seems to work if the reorgs are done in the order advised by db2dart???)
--- the space is STILL not freed up----
8. db2stop (for some reason a FORCE is always required, I can't do this on Prod)/db2start
9. Runstats on all tables in tablespace
List tablespaces now shows the HWM and used pages has dropped and the tablespace can be resized (lowered by 90%)
So trhe problem/question is:
-How much of the above is Voodoo admin (ie stuff I'm doing because I think it's necessary)
-Why do I need to restart the instance to free the space, is this normal and can I avoid it?
Cheers,