Is there some full list of commands that can cause table to become reorg-pending?
I tried google it for a while, but can't find full list. My exact problem for now – can ADD FOREIGN KEY statement cause table to become reorg-pending?
db2db2-luw
Is there some full list of commands that can cause table to become reorg-pending?
I tried google it for a while, but can't find full list. My exact problem for now – can ADD FOREIGN KEY statement cause table to become reorg-pending?
Best Answer
A table is placed in the
reorg pending
mode if you alter its physical structure, such as add or drop a column or change the column data type or nullability.Some operations do not place the table in
reorg pending
, but reorganization is required for the changes to take effect, for example, changing the tableCOMPRESS
attribute or the inline length of a LOB column.Adding or dropping a foreign key does not place the table in
reorg pending
, nor does it require reorganization. However, changing an existing foreign key fromnot enforced
toenforced
will put the table in thecheck pending
mode, which, likereorg pending
, prevents applications from accessing that table.I don't know of a single good source to read more about
reorg
, apart from the DB2 manual, particularly theALTER TABLE
statement and this article:DB2 10.5 for Linux, UNIX, and Windows: Altering tables