Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ID duplicate in RAM db

We got the follow exception in the RAM:
00000050 SystemOut O CRRAM0001E 554520453 ERROR ws com.ibm.ram.repository.web.ws.core.RAM1Impl - One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "3" constrains table "RAMSCHEMA.REPOSITORYMETRIC" from having duplicate values for the index key.
com.ibm.ram.repository.core.IRepositoryAccess$RepositoryException: One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "3" constrains table "RAMSCHEMA.REPOSITORYMETRIC" from having duplicate values for the index key.
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.addMetric(BaseRAMSchemaAccess.java:10640)
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.addMetric(BaseRAMSchemaAcce


We checked this table schema and run this SQL on it:
SELECT INDNAME, INDSCHEMA
FROM SYSCAT.INDEXES
WHERE IID = 3
AND TABSCHEMA = 'RAMSCHEMA'
AND TABNAME = 'REPOSITORYMETRIC'

It shows INDNAME: C4752929, that means the PK "ID' is not duplicate.
This "ID" seems controlled by RAM application, it is not using auto create base on database control.
Should we stop all RAM application and restart Db to resolve this problem?

0 votes



6 answers

Permanent link
Hi,

This happens because the AUTOKEYGEN table, NEXT_METRICS column is not
greater than all of the ID's in the metrics table.

The usual way this occurs is because there are two separate instances of
RAM that are using the same physical database and the instances are not
part of a RAM cluster.

Another way is that the database was somehow updated/manipulated outside
of RAM, such as someone running an SQL script against it.

Or what version of RAM do you have? There was a bug in this area in a
really, really old early version of RAM.

--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Hi Rich,

Thank you, We double checked and found no any other DB connected to this same RAM application. We are using RAM 7.2.5 test fix 5. Thanks.

0 votes


Permanent link
So Rich , could you confirm this error is caused by a bug in our RAM since it is a too old version?

Thanks.

0 votes


Permanent link
Hi,

I don't know what 7.2.5 is. We never released a 7.2.5.

But when I said old, I meant back in 7.0 and early 7.1 days.

The doesn't happen in normal processing. But the fix is to find the
highest ID in the RepositoryMetrics table and then update the
AutoKeyGen.Next_Metrics column to be one more than that.

--
Rich Kulp
Rational Asset Manager developer

0 votes


Permanent link
Hi, Rich,
Sorry I got confirmation, our RAM version is 7.2.0.2, fix pack 6.

So as you mean only the RAM 7.1 has problem , the version 7.2 should be no problem, right?

Or we must upgrade to RAM7.5? Thanks.

0 votes


Permanent link
Hi,

Yes, the bug was only in 7.1. 7.2 and above had no known problems with
the metric id.

I would suggest fixing it up as I suggested and go on with it.

--
Rich Kulp
Rational Asset Manager developer

0 votes

Your answer

Register or log in to post your answer.

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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 24 '11, 3:05 a.m.

Question was seen: 5,166 times

Last updated: Mar 24 '11, 3:05 a.m.

Confirmation Cancel Confirm