My Oracle Support Banner

Error: "Error in Run SQL Script.sspm_ins_aux.sql" And "java.sql.SQLException: 3 > 0" If Using Verbose Output for the Migrate.bat Utility, Table Rows Do Not Match in the Source and the Target Database Causing Constraint Violations (Doc ID 2186348.1)

Last updated on MAY 21, 2018

Applies to:

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


When attempting to migrate data from Oracle/SQL to a SQL Server target database, the following error occurs:

Error in Verbose output (see cause section below for detail to configure verbose mode):
java.sql.SQLException: 3 > 0
  at com.primavera.database.common.container.SQLRowContainer.updateContainer(
  at com.primavera.database.common.container.SQLRowContainer.doNext(
  at com.primavera.database.common.container.SQLRowContainer.Next(
  at Source)

Error in the migrate wizard (migrate.bat) when adding constraints:
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "$CONSTRAINT_NAME". The conflict occurred in database "$DBNAME", table "dbo.$TABLENAME", column '$COLUMNNAME'

The issue can be reproduced at will with the following steps:

  1. Run validate on source database
  2. Validation report is clean
  3. Run migrate.bat
  4. Error is displayed in wizard
  5. Check orphaned records in source database on table in question
  6. No orphaned records in source database
  7. Modify migrate.bat to generate verbose output
  8. Run modified migrate.bat
  9. Error is displayed in verbose output




To view full details, 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 a vibrant support community of peers and Oracle experts.