QM addTables command can fail on 6.0.6.1 upgrade
Authors: WilliamChen Build basis: IBM Rational Quality Manager 6.0.x.
This wiki page provides detailed steps to resolve an addTables command error during 6.0.6.1 upgrade. The failure was only observed on two separate instances.
This known issue is being tracked via this Jazz defect 482936: Migration to 6061 break due to items missing from ITEM_TYPES
Step 1 - Check QM addTables log
This example is from DB2 database:2019-05-14 10:49:13,496 The user "ADMIN" has logged out of the database "//dbServer:port/instanceName:user=xxxxxxxx;password=xxxxxxxx;". 2019-05-14 10:49:13,496 CRJAZ3138E The total number of rows copied to the new version table, REPOSITORY.VERSION, does not match the total number of rows of the older version table(s). 2019-05-14 10:49:13,497 CRJAZ3138E The total number of rows copied to the new version table, REPOSITORY.VERSION, does not match the total number of rows of the older version table(s). com.ibm.team.repository.common.TeamRepositoryException: CRJAZ3138E The total number of rows copied to the new version table, REPOSITORY.VERSION, does not match the total number of rows of the older version table(s). 2019-05-14 10:49:13,498 CRJAZ1791E The migration completed with errors. The imported database is unstable and should not be used without further analysis.
Step 2 - Confirm if there is a mismatch with these two queries
select count(*) from [clmtest_qm].[EXECUTION].[VEXECUTION_RECORD]
select count(*) from [clmtest_qm].[EXECUTION].[VEXECUTION_RECORD] join [clmtest_qm].[REPOSITORY].[ITEM_TYPES] on [clmtest_qm].[REPOSITORY].[ITEM_TYPES].[ITEM_UUID]= [clmtest_qm].[EXECUTION].[VEXECUTION_RECORD].[ITEM_ID]
Step 3 - Restore QM database
This must be done before proceeding to step 4.Step 4 - Run this custom insert command
insert into REPOSITORY.ITEM_TYPES select distinct REPOSITORY.ITEM_STATES.ITEM_UUID, REPOSITORY.ITEM_STATES.ITEM_TYPE_DBID from EXECUTION.VEXECUTION_RECORD join REPOSITORY.ITEM_STATES on ITEM_ID=ITEM_UUID where ITEM_ID not in ( select ITEM_UUID from REPOSITORY.ITEM_TYPES)
Step 5 - Repeat step 2 to confirm there is no mismatch
Proceed remaining 6.0.6.1 upgrade steps if there is no mismatch found.Related topics: Deployment web home, Deployment web home
External links:
Additional contributors: TWikiUser, TWikiUser
Contributions are governed by our Terms of Use. Please read the following disclaimer.
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.