I have some scripts that drop columns in DB2 9. This leaves the table
in a REORG PENDING state:
[IBM][CLI Driver][DB2/NT] SQL0668N Operation not allowed for reason
code "7" on table "tablename". SQLSTATE=57016
I want to write a script that finds all tables in this state and
REORGs them, but I don't know how to generate a set of tables that are
in this state: if I use REORGCHK_TB_STATS I will have to call it once
for every table in the database. Is there an easy way to tell what
tables are in a REORG_PENDING state?
I was hoping that STATUS in SYSCAT.TABLES would tell me, but no....