sql code 7

Operation not allowed for reason code "7" on table XXX,
解决方式
reorg table TQMCR5AT1【表名】

runstats on table TQMCR5AT1【表名】

简单来说reorg table是来优化整理数据库表的,例如当表进行了大量的删减或者新增数据之后,就需要进行reorg。我遇到一个例子就是 在新增大量数据以后没有reorg,导致性能下降,后来排查时索引都有跑,最后发现是没有reorg。
建议在每次使用完alter 操作后都执行一次reorg。

原文地址:https://www.cnblogs.com/Z2978/p/14298267.html