[HOWTO] Offline or Online reorg of database tables

Sunhillow

ADSM.ORG Senior Member
Joined
Oct 27, 2003
Messages
410
Reaction score
16
Points
0
Location
Stuttgart, Germany
Hello everyone,

We recently had a large database growth on a server due to an excessive amount of backup jobs. The affected table was ACTIVITY_LOG. Now this issue has been resolved, but the database won't shrink. There were several automatic online reorg jobs on this table, but all that happens is that the script analyze_DB2_formulas.pl now reports that 20 GB could be gained with an offline reorg. The total used DB space is 54 GB.
Is there a way to get those 20 GB back with an online reorg only? I have never tried to do it offline before.

Thanks in advance!
Hansgeorg
 
Hi Hans,

DB2 databases will never shrink, even when a lot of table space is no longer used. You will have to release space to the file system manually. On the IBM website, you can download a Perl script, which analyzes your database and creates a summary.txt with instructions for which table you can release how much space. The necessary commands are also included in this file.

Kind regards,
Eric
 
Hi Eric,

thanks a lot! With your help I found the command REORGCHK which confirms that the table ACTIVITY_LOG should be reorganized. I fear this table cannot be reorganized online. At least I don't find a command to do so
 
Back
Top