I have a Db2 database on my Linux laptop. The database is not heavily loaded. I access it from time to time for the development purposes.
I removed a column:
db2 "alter table SCHEMA.TABLE drop column COLUMN"
Then, I run
db2 "reorgchk update statistics on table all"
and got the following message:
Doing RUNSTATS .... SQL2310N The utility could not generate statistics. Error "-668" was returned.
However, if I do not ask
REORGCHK to update statistics, the command succeeds:
db2 "reorgchk current statistics on table all"
Further investigation shows that
RUNSTATS on the altered table:
db2 "runstats on table SCHEMA.TABLE for indexes all"
fails with the same error as above (i.e., SQL2310N, -668).
I tried to increse values of same parameters (
STAT_HEAP_SZ), but that did not help.
What could be the reason for the error? How to debug it? How could I fix it?