REORG command in db2

寵の児 提交于 2019-12-08 08:37:18

问题


So I have been altering a table in QMF. After 3 alters I believe the table has gone into a pending reorg state so that I cannot alter it additionally. Am I correct in this assumption? If so what implications does this have and to get around it can I simply reorganize the table and continue altering it? If so, what does the syntax look like for reorganizing a table? I tried REORG TABLE PIDJBIP.TABLE_NAME_T and receive the error:

an unexpected token "PIDJBIP" was found following "REORG TABLE". Expected tokens may include: "JOIN". SQL state = 42601.

I haven't gotten much help out of the IBM pages regarding this subject.


回答1:


REORG is not an SQL statement, so it cannot be issued using a SQL interface (such as QMF). You will need to run it using the DB2 Command Line Processor.

Alternatively, you might use the administrative stored procedure, which you could call via QMF:

call sysproc.admin_cmd('reorg table PIDJBIP.TABLE_NAME_T')


来源:https://stackoverflow.com/questions/31004249/reorg-command-in-db2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!