Why does my upgrade fail due to a foreign key constraint violation?

I am attempting an upgrade from 3.2.1 to version 4.x, and my upgrade fails due to a foreign key constraint violation relating to Role or Function; how do I resolve this issue?

This error is usually due to one or more specific Roles that have been removed from xMatters, and results in an error message similar to one of the following:

error occurred during batching: ORA-02291: integrity constraint  
(ALARMPOINT.AGPG_TARGETAGID_FK2) violated - parent key not found  
INSERT INTO ROLE_PERM_GRANTS (SRC_ROLE_ID, TARGET_ROLE_ID, ROLE_PERM_ID) VALUES  
(16, 5, 2)  
error occurred during batching: ORA-02291: integrity constraint  
(ALARMPOINT.ORP_ORGID_FK2) violated - parent key not found  
INSERT INTO ORG_FUNC_PERMS (ORG_FUNC_ID, PERM_ID) VALUES  
(290,18404)  

To address this issue, xMatters has provided database scripts that will restore the missing Roles.

To run the scripts:

  1. Restore your database to a state prior to the failed upgrade attempt.
  2. Download the attached Add_Roles_SQL.zip file and extract the contents.
  3. In the extracted folder structure, locate the add_roles.sql specific to your database.
  4. Run the add_roles.sql script.
  5. Upgrade xMatters.

Once the upgrade is complete, you can safely delete the Roles again.

xMatters Reference

JDN-1189 Originally created by Don Clark

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk