Wednesday, April 13, 2016

DB2 Table Reorg - DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;

I got db2 error message when I ran a web application.

 DB2 SQL Error: SQLCODE=-668, SQLSTATE=57016, SQLERRMC=7;   

After doing some research, I found out I need to reorg the table it mentioned in the error message.

I tried to just run the reorg command in Aqua Data Studio, but I got error message. After consulted with our DBA, this reorg command is not a sql command. The way to run it in Aqua Data studio is as below.

 call sysproc.admin_cmd('reorg table TABLE_NAME')