Search code examples
db2dbvisualizer

Not able to query after Alter table in DB2


We have a table someone created in DB2. I have no idea how they created it. But when I edit the table, It edits just fine. But after edit I can not query the table at all THE COLUMN CANNOT BE ADDED TO THE TABLE BECAUSE THE TABLE HAS AN EDIT PROCEDURE.

I looked ibm site and found this how to edit table using procedure But I have no idea how to do this.

Is there anything that I can do to fix this with out following the procedure mentioned in second link?

I restarted server, but still no help. First I'm not able to figure out why I get the error in first place.

I'm using DB Visualizer and DB2 on linux.


Solution

  • This is sometimes default behavior of DB2. We need to run reorgchk command to fix these errors. More info below..

    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0000888.htm http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/c0023297.htm