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  
(16, 5, 2)  
error occurred during batching: ORA-02291: integrity constraint  
(ALARMPOINT.ORP_ORGID_FK2) violated - parent key not found  

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


Please sign in to leave a comment.
Powered by Zendesk