Error: "Error in Run SQL Script ssppm_ins_aux.sql : DatabaseToolException (The ALTER TABLE Statement Conflicted With the FOREIGN KEY Constraint "Fk_rsrc " When Running Migrate.bat (Doc ID 2225965.1)

Last updated on FEBRUARY 09, 2017

Applies to:

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

Symptoms

When migrating a P6 database using Migrate.bat, the following errors is observed:

Error in Run SQL Script ssppm_ins_aux.sql : DatabaseToolException (The ALTER
TABLE statement conflicted with the FOREIGN KEY constraint
"fk_rsrcrate_rsrc". The conflict occurred in database "PMDB", table
"dbo.RSRC", column 'rsrc_id'.)for query::ALTER TABLE RSRCRATE ADD CONSTRAINT
fk_rsrcrate_rsrc FOREIGN KEY (rsrc_id) REFERENCES RSRC (rsrc_id)

 

The DatabaseMigration.log file contains the following error:

ERROR
-----------------------
<12.31.2015 12:40:34> INFO 2015-12-31 12:40:34 ALTER TABLE TASK
ADD CONSTRAINT FK_TASK_CALENDAR FOREIGN KEY (CLNDR_ID)
REFERENCES CALENDAR (CLNDR_ID)
<12.31.2015 12:40:37> INFO 2015-12-31 12:40:37 ALTER TABLE TASK
ADD CONSTRAINT FK_TASK_RSRC FOREIGN KEY (RSRC_ID)
REFERENCES RSRC (RSRC_ID)
<12.31.2015 12:40:37> ERROR 2015-12-31 12:40:37 The ALTER TABLE statement
conflicted with the FOREIGN KEY constraint "fk_task_rsrc". The conflict
occurred in database "PMDB1", table "dbo.RSRC", column 'rsrc_id'.
<12.31.2015 12:40:37> ERROR 2015-12-31 12:40:37 Database Error: error
number=547
<12.31.2015 12:40:37> ERROR 2015-12-31 12:40:37 Error Message: The ALTER
TABLE statement conflicted with the FOREIGN KEY constraint "fk_task_rsrc".
The conflict occurred in database "PMDB1", table "dbo.RSRC", column
'rsrc_id'.
<12.31.2015 12:40:37> WARN 2015-12-31 12:40:37 USER Could not complete
because the job "Run SQL Script ssppm_ins_aux.sql" failed.
com.primavera.database.tools.DatabaseToolException: The ALTER TABLE statement
conflicted with the FOREIGN KEY constraint "fk_task_rsrc". The conflict
occurred in database "PMDB1", table "dbo.RSRC", column 'rsrc_id'.
at
com.primavera.database.tools.ScriptRunner.ScriptRunner.runSQL(ScriptRunner.jav
a:209)
at
com.primavera.database.tools.ScriptRunner.ScriptRunner.run(ScriptRunner.java:1
45)
at
com.primavera.database.tools.dbmt.workflow.SqlScriptJob.doJob(SqlScriptJob.jav
a:86)
at com.primavera.database.tools.dbmt.AbstractJob.execute(AbstractJob.java:64)
at
com.primavera.database.tools.dbmt.WorkflowStepJob.doJob(WorkflowStepJob.java:4
9)
at com.primavera.database.tools.dbmt.AbstractJob.execute(AbstractJob.java:64)
at
com.primavera.database.tools.dbmt.actions.BaseWizardRunner.runJob(BaseWizardRu
nner.java:205)
at
com.primavera.database.tools.dbmt.actions.BaseWizardRunner.commit(BaseWizardRu
nner.java:214)
at
com.primavera.database.tools.dbmt.actions.JobTreeTypeDef$JobRunner.run(JobTree
TypeDef.java:253)
at java.lang.Thread.run(Unknown Source)


STEPS TO DUPLICATE
-----------------------
The issue can be reproduced at will with the following steps:
1. Start Migrate.bat
2. Perform a SQL Server to SQL Server Migration

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms