Forum Discussion

dAncer's avatar
dAncer
Level 3
14 years ago

How to find "orphaned" archives (with no mailboxes being archived from)

Recently I've got a question from one of our customers: are there any ways to find archives (in EV 8.0 SP4) which do not have associated mailboxes anymore? Sample: there was a user "A", who had a mailbox on Exchange server and this mailbox has been archiving by EV to appropriate archive for user's A. Later on, this user's A account has been removed from AD as well as Exchange Mailbox for user "A". However, EV doesn't remove the archive automatically. Again, the question is: are there any possibilities to rapidly find these "orphaned" archives? Many thanks in advance!
  • This query should do the trick

    USE EnterpriseVaultDirectory
    SELECT A.ArchiveName, R.VaultEntryID, T.SID
    FROM Archive A, Root R, Trustee T
    WHERE A.RootIdentity = R.RootIdentity
      AND R.OwningTrusteeIdentity = T.TrusteeIdentity
      AND R.VaultEntryID NOT IN
          (SELECT EME.DefaultVaultID FROM ExchangeMailboxEntry EME, Root R WHERE R.VaultEntryID = EME.DefaultVaultID)

3 Replies

  • This query should do the trick

    USE EnterpriseVaultDirectory
    SELECT A.ArchiveName, R.VaultEntryID, T.SID
    FROM Archive A, Root R, Trustee T
    WHERE A.RootIdentity = R.RootIdentity
      AND R.OwningTrusteeIdentity = T.TrusteeIdentity
      AND R.VaultEntryID NOT IN
          (SELECT EME.DefaultVaultID FROM ExchangeMailboxEntry EME, Root R WHERE R.VaultEntryID = EME.DefaultVaultID)
  • Hello dancer,

    (ev75)
    Open console
    Goto archives\exchaneg mailbox, check Bill usage to
    Most likely you will see 'Account unknown (\S-1-5 etc)
    Those are archives that no longer have an account associated.

    GJ