Duplicate entry while restoring data


When inserting a word in mssql with trailing space like “service desk”, the word is inserted as it is. However, when inserting the same word in mysql, the word “service desk ” is trimmed as “servicedesk”.

Also, non English characters (characters with dot / double dot on top of words) might be taken differently across databases. Hence inserting those words could also cause this issue.

Error trace in logs:

At times while restoring data duplicate entry error may occur and the restore process is stopped. The error contains the name of the table which has the duplicate entry i.e., Table name = word occurrences. This table has to be ignored while restoring the data.

Example trace:

Please wait ! Restoring in Progress……………….



java.sql.BatchUpdateException: null,  message from server: “Duplicate entry ‘SATELLITE A100′ for key 2″

        at com.mysql.jdbc.Statement.executeBatch(Statement.java:1057)

        at com.adventnet.servicedesk.tools.RestoreSDBackup.restoreTableData(RestoreSDBackup.java:404)


  • Step 1: Go to the bin directory from the command prompt
  • Step 2: Edit the restoredata.bat by using the command. 
  • Step 3: On opening the restoredata.bat file, edit the below entry%JAVA% %JAVA_OPTS% -Xms128m -Xmx512m -cp %CLASS_PATH% com.adventnet.servicedesk.tools.RestoreDialog %1 %2
    %JAVA% %JAVA_OPTS% -Xms128m -Xmx512m -cp %CLASS_PATH% -Dsdp.restore.error.ignoretables=Error_table_name com.adventnet.servicedesk.tools.RestoreDialog %1 %2

    NOTE: Replace Error_table_name with the table name with the duplicate entry (ie) in our case the table name = wordoccurrences


    %JAVA% %JAVA_OPTS% -Xms128m -Xmx512m -cp %CLASS_PATH% -Dsdp.restore.error.ignoretables=wordoccurrences com.adventnet.servicedesk.tools.RestoreDialog %1 %2

  • Step 4: Now try to restore the data again. The data should get restored.

Need More Help?

Are you looking for a personalized customer support? Submit your question or Call our Toll Free Number to speak with ServiceDesk Plus MSP Expert who can offer a better solution for your requirements.

Submit a Ticket
Email : sdpmsp@manageengine.com
Toll Free : 1-888-720-9500