I've tried many forms, like reorg table EXP_RECORD;
reorg table db2u7015.EXP_RECORD;
and I am using DbVisualizer, can be that the problem?looks like the editor doesn't recognize command reorg, because it doesn'thighlight the word as it does with works like table or select…
REORG is not SQL, it is a DB2 command and cannot beexecuted as if it was SQL. You can either use the CLP to use REORG or you canuse:IBM DB2 9.5 Information Center for Linux, UNIX, andWindows if you must use SQL.
Simply issue these on the shell command line:
db2 connect to <your database name here>
db2 REORG TABLE DB2ADMIN.XCATENTRYEXT
<jdbcConnectiondriverClass="com.ibm.db2.jcc.DB2Driver"
connectionURL="jdbc:db2://172.17.106.194:50000/qa3new"userId="db2inst"
password="*****">
</jdbcConnection>
首先登陆到172.17.106.194 DB2服务器,然后切换用户su db2inst,执行db2命令后如下所示:
然后执行connect toqa3new命令,接着执行reorg tables SALES.TBL_SALES_COMMISSIONS命令,重构成功!
参考网址:
https://baohua.me/database/rhel5-install-db2-v9-7-database/
http://www.dbforums.com/showthread.php?1654553-Sqlcode-668-sqlstate-57016-sqlerrmc-7