Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

reorg table TST03


In our ECC system, the table TST03 has grown to 700 GB due to the spool reorg job not running. We have deleted a lot of data from the table by running the program RSPO1041. After the deletion, we first tried online reorg command. It got completed within few seconds without reducing the tablespace. Even the offline reorg also completed in few seconds without deleting anything. We noticed that the most of the data are Long Objects. Is it the reason, the reorg is not reclaiming any space. In this case, how to reorg the table and reclaim the space.

Version - DB2 9.5 on AIX

Thanks & Regards,


Former Member
Former Member replied

Hi Saravanan,

For checking progress of reorg you can use command:

db2pd -db <SID> -reorgs

This will give an idea as to Reorg is in which phase and what is current and what should be maxcount to finish reorg

Other command is :

db2 list history reorg all for <SID>

I will suggest you better create an sql script of command using vi editor and then run this script using nohup so that it runs in backround and nohup.out file can give you output of progress.Steps to follow are:

a) Cretae an sql script at home directory of db2<sid> using vi editor
   eg:-> reorg_tst03.sql and when you do more it should show command for reorg inside like below

  sapserverxxx:db2<sid> 2> more reorg_tst03.sql
  reorg table sap<sid>.TST03 allow no access use PSAPTEMPREORG longlobdata;

b)Start reorg using command from home directory of db2<sid>
nohup db2 -tvf reorg_tst03.sql &

c)Do monitoring using command told in beginning

Also more important take statistics of table from dbacockpit before doing reorg and after reorg compare the values.

For space required as a thumb rule it should be twice the actual size of table. If you are sure table size is 5 GB then space required would be 10 to 15 GB max

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question