In this days I'm in the middle of upgrade process with DB2 repository and I was getting some issue using dbmt.jar with 2 db, Opnact and Metrics, below you could see the error stack and the resolution.
Opnact
This was the error stack
Transferring table --{ ACTIVITIES.OA_NODE}-- to table --{ACTIVITIES.OA_NODE }--ERROR: Error validating data. The number of values is not equal to the number of columns in the destination table OA_NODEERROR: The number of values is 38 while the number of columns is 37 error.executing.transfer
com.ibm.wps.config.DatabaseTransferException: Column number mismatch
at com.ibm.wps.config.db.util.RowHelper.updatePreparedStatement(RowHelper.java:271)
at com.ibm.wps.config.db.transfer.DefaultTableHandler.execute(DefaultTableHandler.java:106)
at com.ibm.wps.config.db.transfer.TransferEngine.execute(TransferEngine.java:70)
at com.ibm.wps.config.db.transfer.CmdLineTransfer.execute(CmdLineTransfer.java:96)
at com.ibm.wps.config.db.transfer.CmdLineTransfer.main(CmdLineTransfer.java:43)
the number of column inside OA_NODE table wasn't match the source and destination DB ! After some troubleshooting and investigation I've found the confirm and the resolution using our great community (thanks Michele ! ) .
before launch dbmt.jar migration i've created the missing column on target db
db2 connect to opnact
db2 ALTER TABLE ACTIVITIES.OA_NODE ADD COLUMN OWNERMEMBERUUID CHAR(36) NULL;
db2 reorg table ACTIVITIES.OA_NODE
db2 disconnect opnact
after the migration I've dropped the column (yep looks simple when you have the solution)
db2 connect to opnact
db2 ALTER TABLE ACTIVITIES.OA_NODE DROP COLUMN OWNERMEMBERUUID
db2 reorg table ACTIVITIES.OA_NODE
db2 disconnect opnact
This resoution was validated from IBM Support but in case you will get this kind of error, I reccomend to open a PMR as double chek.
METRICS
Metrics after few minutes was interrupted with this steck
Transferring table --{ METRICS.F_USER_EVENT_COUNT}-- to table --{METRICS.F_USER_EVENT_COUNT }--error.executing.transfer
err.dbtransfer.exception.labelclass com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][4.24.92] Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements. ERRORCODE=-4229, SQLSTATE=null
com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][4.24.92] Batch failure.
The batch was submitted, but at least one exception occurred on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements. ERRORCODE=-4229, SQLSTATE=null
at com.ibm.db2.jcc.am.b6.a(b6.java:502)
at com.ibm.db2.jcc.am.Agent.endBatchedReadChain(Agent.java:434)
at com.ibm.db2.jcc.am.k4.a(k4.java:5420)
at com.ibm.db2.jcc.am.k4.c(k4.java:4998)
at com.ibm.db2.jcc.am.k4.executeBatch(k4.java:3052)
at com.ibm.wps.config.db.transfer.DefaultTableHandler.execute(DefaultTableHandler.java:131)
at com.ibm.wps.config.db.transfer.TransferEngine.execute(TransferEngine.java:70)
at com.ibm.wps.config.db.transfer.CmdLineTransfer.execute(CmdLineTransfer.java:96)
at com.ibm.wps.config.db.transfer.CmdLineTransfer.main(CmdLineTransfer.java:43)
after some trouble shooting and similar stack error inside a tech note I've realized my target db doesn't have the transactional logs enabled so I've
- drop target metrics db
- rebuild empty metrics db 5.5
- enabled transaction log
- relaunch dbmt.jar
Thx
ReplyDeleteMy plaisure ;-)
DeleteThanks for sharing this! I have exactly the same issues. Just one question, how did you enable the transaction log? It seems hard to find a clear db2 documentation explaining that.
ReplyDelete-Roger
Thanks a lot! I ran into the exact same problem. On Linux I needed quotation marks for the 2nd command:
ReplyDeletedb2 "ALTER TABLE ACTIVITIES.OA_NODE ADD COLUMN OWNERMEMBERUUID CHAR(36) NULL"