Article ID: 128738, created on Apr 24, 2016, last review on Apr 24, 2016

  • Applies to:
  • Operations Automation

Symptoms

Attempt to remove mailbox or distribution list from Exchange user in CCP fails with the following error:

Duplicate key violates unique constraint 'mlabs_protected_emailsuni_0' while executing ''

or

Duplicate key violates unique constraint 'mlabs_protected_emailsuni_0' while executing ' UPDATE mlabs_protected_emails SET sync_status = ? , was_updated = ? WHERE recipient_id = ? AND recipient_type = ? AND sync_status != ?'.

The following error can be found in poa.debug.log:

Plesk::MessageLabs::OrganizationImpl::removeRecipientEmails] ===> ENTRY
Jul 24 17:14:14 PEMOSS01 : DBG [UI:fa4ab42a:1406218454006 1:8660:2134 Kernel]: STMT [Con: 150, 1235DFA8 txn:218584] ' UPDATE mlabs_protected_emails SET sync_status =  ? , was_updated =  ? WHERE recipient_id =  ? AND recipient_type =  ? AND sync_status !=  ?'($0 = 'd', $1 = 'y', $2 = 2776469, $3 = 'mbx', $4 = 'd')
Jul 24 17:14:14 PEMOSS01 : DBG [UI:fa4ab42a:1406218454006 1:8660:2134 Kernel]: [txn:218584 Plesk::DBS::checkSQLError] Diagnostic info about SQL error: sqlreturn=0 state=23000, nativeCode=2627, description=[Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of UNIQUE KEY constraint 'mlabs_protected_emailsuni_0'. Cannot insert duplicate key in object 'dbo.mlabs_protected_emails'.
Jul 24 17:14:14 PEMOSS01 : DBG [UI:fa4ab42a:1406218454006 1:8660:2134 lib]: [txn:218584 Plesk::DBS::Statement::execQuery] {module_id="db_service"; code="110"} Duplicate key violates unique constraint                    'mlabs_protected_emailsuni_0' while executing ' UPDATE mlabs_protected_emails SET sync_status =  ? , was_updated =  ? WHERE recipient_id =  ? AND recipient_type =  ? AND sync_status !=  ?'.
Jul 24 17:14:14 PEMOSS01 : DBG [UI:fa4ab42a:1406218454006 1:3212:2220 MessageLabs]: [txn:218584 Plesk::MessageLabs::OrganizationImpl::removeRecipientEmails] <=== EXIT (by exception) [0.046876]

Cause

Such duplicate records appeared in OA database due to the bug POA-62297: Messagelabs task failed due to duplicates in database.

It was fixed in OA 5.3. However, there can be remained records in database that should be removed.

Resolution

Please contact Odin technical support to fix the database inconsistency.

Search Words

updateRegisteredUsersHandler on OBJREF:MessageLabs:0:getOrganizationSafe:14783

Duplicate key violates unique constraint 'mlabs_protected_emailsuni_0' while executing ''.

Violation of UNIQUE KEY constraint 'mlabs_protected_emailsuni_0

unable to delete mailbox

duplicate key

cannot remove mailbox

unable to delete user

unable to delete email account

mlab_protected_emails

Error Duplicate key violates unique constraint 'mlabs_protected_emailsuni_0' while executing ' UPDATE mlabs_protected_emails SET sync_status = ? , was_updated = ? WHERE recipient_id = ? AND recipient_type = ? AND sync_status != ?'.

error when deleting DL

Duplicate key violates unique constraint

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF