Roles import fails with unique constraint (IAMOBJECT.PK_PX_WHEN) violated
search cancel

Roles import fails with unique constraint (IAMOBJECT.PK_PX_WHEN) violated

book

Article ID: 405187

calendar_today

Updated On:

Products

CA Identity Manager

Issue/Introduction

When importing a roles.xml file, the import fails with the following message in the idmmanage console.

 

Home > Environment > IdentityEnv > Roles

 

Role Configuration Output:

Warning: Updating the IdentityMinder environment "IdentityEnv"

    Deploying role definitions...

         Importing Managed Objects...

Error:    ORA-00001:  unique constraint (IAMOBJECT.PK_PX_WHEN)

 

*************

1 error(s), 0 warning(s) 

Cause

Identity Manager is unable to set the next sequence value for the unique_id of a Policy Xpress event name, because that number already exists.

The database itself calculates the next sequence value (or unique_name) to insert into the PX_WHEN table, but finds that the calculated value is already exceeded in the table.

This is an example of the sql that fails:

INSERT INTO "PX_WHEN"("ENV_OID", "EVENTNAME", "TYPE", "STEP", "UNIQUE_NAME") VALUES (?,?,?,?,PX_WHEN_SEQ.NEXTVAL) 

The above scenario indicates a problem with data integrity in the PX_WHEN object store table. The two SQL Server databases in the cluster were not synchronized with the same, exact data.

 

Resolution

All nodes of the object store database need to have the same data. The Identity Manager code relies on the database to generate the sequence values.

Identity Manager, via the application datasource URL, points to the DB cluster address as if it is one database, so your DBA team should investigate why the data is not the same (like time delays, data corruption, etc.) and then fix the data.