Forum Discussion

GTK's avatar
GTK
Level 6
8 years ago

SQL query

hi we are on EV 9 sp4. I have the SQL query below. This gives me archive name and last time an archive was modified. I would like also to include the mbxalias info from the 'exchangemailboxentry' ta...
  • plaudone1's avatar
    8 years ago

    Hi GTK,

    This should work for you.

     

    SELECT
    EVDA.Archivename,
    round(cast(AP.ArchivedItemsSize as float)/1024,2) as 'size of archive in MB',
    Ap.ArchivedItems as 'no of archived items',
    AP.modifieddate,
    eme.MbxAlias

    FROM archivepoint AP

    Inner Join enterprisevaultdirectory.dbo.root EVDR on EVDR.VaultEntryID = AP.ARchivePointID

    Inner Join enterprisevaultdirectory.dbo.archive EVDA on EVDA.RootIdentity = EVDR.RootIdentity
    JOIN EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry EME on EME.DefaultVaultId = AP.ArchivePointId

    WHERE modifieddate < '2016-08-24'