Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding the status of a completed offline table reorg

ADSM/TSM Troubleshooting Tips

Finding the status of a completed offline table reorg

by  LED888  Posted    (Edited  )
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.

2014-08-06-15.54.35.922854-300 E90499622A509 LEVEL: Warning
PID : 18284718 TID : 3857 PROC : db2sysc 0
INSTANCE: mttsm18 NODE : 000 DB : TSMDB1
APPHDL : 0-69 APPID: *LOCAL.mttsm18.140806161001
AUTHID : MTTSM18
EDUID : 3857 EDUNAME: db2agent (TSMDB1) 0
FUNCTION: DB2 UDB, data management, sqldEndIndexCreate, probe:1
MESSAGE : ADM5542W Indexes on table "TSMDB1 .BF_BITFILE_EXTENTS" are
successfully rebuilt.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top