Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

SQL Query Help on EV server

Created: 12 Oct 2012 • Updated: 24 Oct 2012 | 8 comments
KeirL's picture
This issue has been solved. See solution.


I'm getting Event id 3333 (duplicate entries for mailbox) errors for our Journal Mailbox. I've run the following command and confirmed this to be the case:

select * from ExchangeMailboxEntry where LegacyMbxDN = '<Mailbox>'

I get two entries returned with MbxIndentity of '18' and '19'

I can see from the size of the mailboxes that number '19' is the invalid one (zero size etc) and so I want to delete this entry. what command should I run to delete this entry? I tried:

delete from dbo.ExchangeMailboxEntry Where MbxIdentity = 19        

 But that returns the following:

Msg 547, Level 16, State 0, Line 1

The DELETE statement conflicted with the REFERENCE constraint "FK_JournalingTarget_ExchangeMailboxEntry". The conflict occurred in database "EnterpriseVaultDirectory", table "dbo.JournalingTarget", column 'ExchangeMailboxEntryId'.

The statement has been terminated.  

Is that because this is\was a journaling target and needs to be removed from other locations first?

Any help\commands would be greatly appreciated.

kind regards

Comments 8 CommentsJump to latest comment

GertjanA's picture

I had the same excercise

Remove the journal mailbox from the ev-console

Then delete the entry.

add the journal mailbox again.

sync the journal mailbox. off you go.

Also see this one:

I have some issues opening the TechNote part of Symantec, so can't get you the link to it

Below what I used:

Find Duplicates:

SELECT [MbxDisplayName]
  FROM [EnterpriseVaultDirectory].[dbo].[ExchangeMailboxEntry]
Where MbxDisplayName like '%Name of mailbox%'
order by MbxDisplayName

When found: Delete Journal Mailboxes from Target in EV-console, Remove entries in database using below:

from ExchangeMailboxEntry
where (LegacyMbxDisplayName like '%Name of mailbox%')

Create Journal Mailboxes again in Target in EV Console, Sync mailboxes on task

If they do not sync: (yyyy-mm-dd hh:mm:00:000) (set to current date/time, then sync)

UPDATE ExchangeMailboxEntry
SET LastModified = '2012-10-12 14:50:00.000'
WHERE (MbxDisplayName = 'Name of mailbox')

Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS

KeirL's picture

Thanks for the reply

So you mean delete the journal target (and task?) from the VAC and then run:

delete from dbo.ExchangeMailboxEntry Where MbxIdentity = 19

Where 19 is the mbxIdentity of the invalid entry.

Do I also need to delete mbxindentity of the VALID journal mailbox which is '18' ?


John Santana's picture

Gertjan, does by deleting the duplicated Mailbox, EV will start to archive the email contents from the beginning again consistently ?

Kind regards,

John Santana
IT Professional


Please be nice to me as I'm newbie in this forum.

GertjanA's picture

Hi John,

What you basically do is that you delete the entries for the journal-mailbox. You do not touch the actual journal mailbox, or the archive, or even the task that handles this mailbox. If you move a journal mailbox, it get's a double entry in the ExchangeMailboxEntry, causing issues.

When you remove the Journal Mailbox first from the EV-console (Targets\Exchange\Exchangeserver\Journalmailbox), then delete the entries from the table mentioned, then re-add the journalmailbox, you basically just redefine the Journalmailbox to EV.

As you do not touch the journalmailbox itself, EV will start archviing from it again as soon as it is defined and synced.

I hope this clarifies.

Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS

KeirL's picture

Many thanks for the extra information.

So currently I have a duplicate entry for the journal mailbox. Do I need to delete both entries from within the SQL table or just the duplicate entry?

many thanks

GertjanA's picture

Hi KeirL

You need to remove both entries from the SQL table. When gone, you add the Journal Mailbox again in the VAC, when entered, sync the mailbox from the corresponding task, restart the task.

How I did it is one of the previous comments.

In short:

In SQL, find the duplicates.

In VAC, delete journal mailbox affected.

In SQL delete entries for mailbox.

In VAC create journal mailbox again.

In VAC, sync mailbox using the task that archives that mailbox.

When sync fails, in SQL, verify/change last modification date.

and it works again.

Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS

John Santana's picture

many thanks Gertjan for the clarification !

Kind regards,

John Santana
IT Professional


Please be nice to me as I'm newbie in this forum.

GertjanA's picture

yw. if satisfied, can you mark a post as a solution, to close of this thread?


Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS