Reptools command import fails on DB with SqlIntegrityConstraintViolationException
Do you have any idea what we could do to address this exception?
One answer
The DBTrsModeContributionTree table is a cache of contribution trees that was introduced in 7.0 RC2 (release candidate) onwards. It requires that the configuration URI is unique. That uniqueness constraint was there from the outset, so I'm puzzled as to how the data in the source SQL database can have such duplicate configuration URIs.
For now, I suggest we clear that contribution cache in 7.0.2 on SQL before the export. Since this is happening on the ETM container, you can clear the cache by using a web browser on
<qmContextRoot>/gcsdk/diagnostics
clicking on the ClearConfiguration Cache button.
That should clear that table. Then export from ETM out of MS SQL server and retry the import into DB2.
The only downside of clearing that cache is that the first time users access a particular GC from ETM, it may take longer to initialize the context because the contribution data for that GC will not be in the cache and will have to be fetched. Over time, the cache will get repopulated with data for the GCs that ETM users access.