Forum Discussion

Veritas_Resolve's avatar
6 years ago

Mailbox disabled from archiving

Hello Experts,

I need help with my problem that I am having at my organization. I'm supposed to delete all the archives of the users(users who has already left the Org.) whose mailboxes were disabled/deleted before Jan 2012. Can someone please provide me with a SQL query to find the same?

Thank you in advance.

Best Regards

  • I don't think this is something you can find in SQL unfortunately. Probably best to check with the HR department to get a list, and then match that with the archives in EV

3 Replies

  • I don't think this is something you can find in SQL unfortunately. Probably best to check with the HR department to get a list, and then match that with the archives in EV

  • Hello,

    the below query will list some basic information about the archives. It is safe to assume if the Newest Archived Item is < 1/1/2013 those archives are for users who left. But, I would also check/verify with HR department.

    --
    -- Query shows Archive Information of one user, when archivename is filled in
    -- Change My User to archivename needed
    -- For all archives in VS, comment And A.ArchiveName - 'My User' etc
    --
    -- Change MyVaultStore to your VaultStore database name

    SELECT  A.ArchiveName "Archive Name",
            AP.CreatedDate "Archive Created",
            AP.ModifiedDate "Archived Last Modified",
            MIN(S.IdDateTime) "Oldest Sent/Received Item",
            MAX(S.IdDateTime) "Newest Sent/Received Item",
            MIN(S.ArchivedDate) "Oldest Archived Item",
            MAX(S.ArchivedDate) "Newest Archived Item"

    FROM    EnterpriseVaultDirectory.dbo.Archive A,
            EnterpriseVaultDirectory.dbo.Root R,
     MyVaultStore.dbo.ArchivePoint AP,
            MyVaultStore.dbo.Saveset S
           
    WHERE   A.RootIdentity = R.RootIdentity
      AND   R.VaultEntryId = AP.ArchivePointId
      AND   AP.ArchivePointIdentity = S.ArchivePointIdentity
      AND   A.ArchiveName = 'My User'
    GROUP BY A.ArchiveName, AP.CreatedDate, AP.ModifiedDate
    order by AP.CreatedDate

    • Veritas_Resolve's avatar
      Veritas_Resolve
      Level 4

      Thank you both for your kind replies. You are right, I need to get this info. from the HR.

      Thanks again! :)