My Oracle Support Banner

ERROR: "The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_project_matrix". The conflict occured in database "pmdb_contractdata", table "dbo.RISKSCRMTX", column 'matrix_id'." When Attempting to Migrate Database (Doc ID 2466331.1)

Last updated on SEPTEMBER 09, 2020

Applies to:

Primavera P6 Enterprise Project Portfolio Management - Version 18.8 and later
Information in this document applies to any platform.

Symptoms

When attempting to migrate a database using the migrate.bat utility, the following error occurs:

ERROR
DatabaseToolExeption (The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_project_matrix". The conflict occurred in database "<$DATABASE_NAME>", table "dbo.RISKSCRMTX", column 'matrix_id'.)

DatabaseMigration.log:

[ERROR] [2018-09-25 10:35:27] The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_project_matrix". The conflict occurred in database "<$DATABASE_NAME>", table "dbo.RISKSCRMTX", column 'matrix_id'.
[ERROR] [2018-09-25 10:35:27] Database Error: error number=547
[ERROR] [2018-09-25 10:35:27] Error Message: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_project_matrix". The conflict occurred in database "<$DATABASE_NAME>", table "dbo.RISKSCRMTX", column 'matrix_id'.
[WARN] [2018-09-25 10:35:27] [USER] Could not complete because the job "Run SQL Script sspm_ins_aux.sql" failed.
com.primavera.database.tools.DatabaseToolException: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_project_matrix". The conflict occurred in database "<$DATABASE_NAME>", table "dbo.RISKSCRMTX", column 'matrix_id'.
at com.primavera.database.tools.ScriptRunner.ScriptRunner.runSQL(ScriptRunner.java:209)
at com.primavera.database.tools.ScriptRunner.ScriptRunner.run(ScriptRunner.java:145)
at com.primavera.database.tools.dbmt.workflow.SqlScriptJob.doJob(SqlScriptJob.java:86)
at com.primavera.database.tools.dbmt.AbstractJob.execute(AbstractJob.java:67)
at com.primavera.database.tools.dbmt.WorkflowStepJob.doJob(WorkflowStepJob.java:49)
at com.primavera.database.tools.dbmt.AbstractJob.execute(AbstractJob.java:67)
at com.primavera.database.tools.dbmt.actions.BaseWizardRunner.runJob(BaseWizardRunner.java:206)
at com.primavera.database.tools.dbmt.actions.BaseWizardRunner.commit(BaseWizardRunner.java:215)
at com.primavera.database.tools.dbmt.actions.JobTreeTypeDef$JobRunner.run(JobTreeTypeDef.java:253)
at java.lang.Thread.run(Thread.java:748


STEPS
The issue can be reproduced at will with the following steps:
     1. Run the migrate.bat
     2. Observe the error is displayed during the process of implementing constraints.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.