Db2 – altering a db2 table with huge amount of data

db2query

I have a table in DB2 which is having 99 columns and 900,000 records of data.

I want to alter the table with one extra column as below:

ALTER TABLE MYSCHEMA.PRODUCT ADD UPDATE_DT DATE

However, the query never completes and the status of the table shows locked against my id in the APPLICATION LIST window from where I have to force kill it.

I believe this is because of the huge amount of data present.

Am I missing anything here ? How can I achieve what I am trying to do ?

Best Answer

Did you check the db2 diag log? what does it say?

The first thing comes into my mind it is that probably, the database does not rollback when the transaction log is full, but instead your updates never finishes.

Check the database logging parameter to see if there is enough log space to record the transaction.

BLK_LOG_DSK_FUL http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0006131.html