0

I got these error messages when migrating from Oracle to MSSQL (Unfortunately, the error messages are in German languages)

  1. Verletzung der PRIMARY KEY-Einschränkung "DTR_PK". Ein doppelter Schlüssel kann in das csm_master.DTR-Objekt nicht eingefügt werden. Der doppelte Schlüsselwert ist (cze, Erfüllungsgrad Massnahmen, 1).

  2. Die Spalte 'VERSION_STR' lässt DBNull.Value nicht zu.

  3. Verletzung der PRIMARY KEY-Einschränkung "NTR_PK". Ein doppelter Schlüssel kann in das csm_master.NTR-Objekt nicht eingefügt werden. Der doppelte Schlüsselwert ist (außen, cz, 0).

  4. Could not count rows in the target table after migration. Migration may have succeeded, but row count is not verified.

    Error: Das Ausführungstimeout ist abgelaufen. Der Timeoutzeitraum wurde überschritten, bevor der Vorgang beendet wurde, oder der Server antwortet nicht.

Could you please help ?

English Translations (via Google) as follows:

  1. Violation of the PRIMARY KEY constraint "DTR_PK". A duplicate key can not be inserted into the csm_master.DTR object. The double key value is (cze, fulfillment degree measures, 1).

  2. Column 'VERSION_STR' does not allow DBNull.Value.

  3. Violation of PRIMARY KEY constraint "NTR_PK". A duplicate key can not be inserted into the csm_master.NTR object. The double key value is (outside, cz, 0).

  4. Error: The execution timeout has expired. The timeout period was exceeded before the process was completed, or the server did not respond.

  • Welcome to DBA.SE and thanks for participating. Could you provide the table definitions for the source table and the target table? Are you using SSIS to transform the data? Is the last error messages correct the way I formatted it? Please add the additional information to the question by editing it. Without this information your question might be closed as too broad or unclear what you are asking. – John aka hot2use Oct 22 at 13:48
  • Additional information regarding the RDBMS versions could also help. (Oracle 12, SQL Server 2016, ....). Use the relevant tags (e.g. oracle-12c, sql-server-2014, .... – John aka hot2use Oct 22 at 13:50
  • SQL Server, unlike Oracle, is not always case-sensitive. In Oracle see if the key value (outside, cz, 0) is present in a different case, eg (outside, CZ, 0), and your target SQL Server tables have a case-insensitive collation. – David Browne - Microsoft Oct 23 at 14:50
1

For the first 3 errors please look at your table definitions ...

1 and 3 -> you defined a primary key over 3 columns for both tables, then try to insert data that contain the same combination of data in those 3 columns. Compare your table definitions between Oracle and your new database - I can't imagine that this has worked before with the same constraints

2) the column in question carries a NOT NULL ... and now you try to insert a NULL / DBNull - either you changed the column definition - or you have an error in your program / script that tries to migrate the data

Can't say anything about error 4

1

#4: SQL Server itself does not have time outs but the client-side libraries do. Tweak the client parameter values or reduce the amount of work submitted in a batch.

0

Thanks for your answers

I have solved 4) by changing the Query timeout to the maximum, this error message did appear only while migrating large tables.

@eagle275, yes you are right, there is a primary key over 3 columns for both tables Please check pic below. SSMA says there is a duplicate key, but there are no duplicates in the table.

enter image description here

3) is also solved

Thank you guys

Not the answer you're looking for? Browse other questions tagged or ask your own question.