Question
How can I find the status of a completed offline table reorganization?
Answer
When an offline table reorganization is running, you can check its status using the DB2 command:
db2pd -d <database> -reorg
However, after the reorganization has finished, the db2pd command might no longer give information about it.
You can check the status of the completed reorganization by using one of the two methods below.
1) Run the 'db2 list history reorg' command.
For example, to find the history of reorganizations done on or after August 6, 2014, run the command below:
# db2 list history reorg since 20140806 for db TSMDB1
List History File for TSMDB1
Number of matching file entries = 2
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
G T 20140806111249 F S0049699.LOG S0049699.LOG
----------------------------------------------------------------------------
Table: "TSMDB1 "."BF_QUEUED_CHUNKS"
----------------------------------------------------------------------------
Comment: REORG USE 12
Start Time: 20140806111249
End Time: 20140806112625
Status: A
----------------------------------------------------------------------------
EID: 107559
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
G T 20140806113334 F S0049699.LOG S0049700.LOG
----------------------------------------------------------------------------
Table: "TSMDB1 "."BF_BITFILE_EXTENTS"
----------------------------------------------------------------------------
Comment: REORG USE 12
Start Time: 20140806113334
End Time: 20140806155436
Status: A
----------------------------------------------------------------------------
EID: 107564
-----------------------------------------------------------------------------
Note: the status flags for the 'db2 list history' command are below:
History entry status flag:
A - Active
D - Deleted
E - Expired
I - Inactive
N - Not yet committed
P - Pending delete
X - Do not delete
a - Incomplete active
i - Incomplete inactive
2) Check the db2diag.log file for messages concerning the rebuilding of the table's indices. The index rebuild starts after the table has been reorganized. Below is an example where the indices for the BF_BITFILE_EXTENTS table have been successfully rebuilt.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.