Start a conversation

Error: Failed to update database. Error Message: A duplicate value cannot be inserted into a unique index

Answer

PROBLEM

Error: Failed to update database. Error Message: A duplicate value cannot be inserted into a unique index

ENVIRONMENT

  • GFI MailEssentials

SOLUTION

  •  Locate the exact error in the mailessentials.controllists.xxx logs located in the \GFI\MailEssentials\Antispam\debuglogs folder
Example error:
  • "error ","MailEssentials.ControlLists.PWL","Error: Failed to update database. Error Message: A duplicate value cannot be inserted into a unique index. [ Table name = PWLBL_UserEmails,Constraint name = UQ__PWLBL_UserEmails__0000000000000059 ]" 
  • "error ","MailEssentials.ControlLists.PWL","Error: Full Details: A duplicate value cannot be inserted into a unique index. [ Table name = PWLBL_UserEmails,Constraint name = UQ__PWLBL_UserEmails__0000000000000059 ]"

Run the following query:
  • SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS where table_name = 'PWLBL_UserEmails' 

Run the following query to remove the corrupt entry
  • alter table [PWLBL_UserEmails] drop constraint UQ__PWLBL_UserEmails__00000000000000XX 
  • The 00000000000000XX at the end of the query should be changed to match the number in the actual error, in this case it would be:
  • alter table [PWLBL_UserEmails] drop constraint UQ__PWLBL_UserEmails__0000000000000059
  • Remove the blank entry from the PWLBL_UserEmails table by right clicking it and selecting delete

For issues with tables other than the PWLBL_UserEmails table, use these commands.
  • SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS where table_name = 'PWLBL_Emails' 
  • SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS where table_name = 'PWLBL_Users' 
  • alter table [PWLBL_Emails] drop constraint UQ__PWLBL_Emails__00000000000000XX 
  • alter table [PWLBL_Users] drop constraint UQ__PWLBL_Users__00000000000000XX

CAUSE

Blank or corrupt entry in a controllists.sdf table
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments