My Oracle Support Banner

Database Migration Fails with Error The ALTER TABLE Statement Conflicted with the FOREIGN KEY Constraint "fk_projshar_usession" (Doc ID 2679656.1)

Last updated on MARCH 22, 2022

Applies to:

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

Symptoms

When attempting to use the Database Migration Utility (migrate.bat (.sh)) to migrate a P6 schema from Oracle to SQL Server,
the following error occurs.

ERROR
-----------------------
[ERROR] [2020-05-30 21:17:25] The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_projshar_usession". The conflict occurred in database "PMDB", table "dbo.USESSION", column 'session_id'.
[ERROR] [2020-05-30 21:17:25] Database Error: error number=547
[ERROR] [2020-05-30 21:17:25] Error Message: The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "fk_projshar_usession". The conflict occurred in database "PMDB", table "dbo.USESSION", column 'session_id'.
[WARN] [2020-05-30 21:17:25] [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_projshar_usession". The conflict occurred in database "PMDB", table "dbo.USESSION", column 'session_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. Execute migrate.bat (.sh)
2. Enter the connection details for the target and source databases.
3. Initiate the migration.
4. Refer to the 'DatabaseMigration.log' for the error details.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot successfully migrate the database.

Changes

 

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
Changes
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.