How to resolve CFG_ATOM constraint exceptions

  • 7004339
  • 01-Sep-2009
  • 11-Jul-2012

Environment

Business Service Management 4.0
Business Service Management 4.5

Situation

You are running BSM with Oracle as the configuration back end and you see Oracle constraint exceptions in the CFG_ATOM that look similar to this, in the formula.trc:

ORA-00001: unique constraint (FORMCFGMAF.ATOM_PK) violated

Resolution

If you receive the constraint exception mentioned above you need to bring up a SQL client against your Oracle database and follow these steps:

1. select MAX(id) from CFG_ATOM
2. Record result
3. select hibernate_sequence.nextval from dual
4. Record result

If the value from step two is greater than the value of step four, then you need to take some corrective steps. First stop BSM, your system is in an unstable state because of the constraints exceptions then you'll need to run queries against the Oracle database.

1. Subtract the value of step four above from the value of step two
2. alter sequence hibernate_sequence increment by <by the result of the previous step>
    For instance, step two above returned a value of 100, but step four returned a value of 80, then the value should be 20 or higher for the alter query.
3. select hibernate_sequence.nextval from dual
4. Verify that the step three value is equal or greater to the max id of the CFG_ATOM table
5. alter sequence hibernate_sequence increment by 1

Commit your changes and restart BSM.

If this does not resolve this issue please contact BSM support.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.