Forum Discussion

quebek's avatar
quebek
Moderator
21 days ago

EV storage expiry - what exactly will be expired?

Hello,

I am working on some EV envs in which there was never ran storage expiry. Now I was tasked to do so. I did read about it that it can have performance impact on exchange, sql and storage. 

Prior to run it I am willing to make sure that it will expire only what is desired to be expired. How I can I check this out? EV is on 14.x in one env and the other is 15.x. 

What is the best approach to start it? any tips??

  • You can also run in Report Mode.  

    In order to run Storage Expiry to run in Report Mode and not have shortcuts delete, Process Vault Stores on the Storage Expiry tab must be set to Never.

    Note: A restart of the Enterprise Vault Admin Service needs to be performed after making the change.

  • Hello. I'll add some queries to assist hopefully. Main thing to check initially:

    What do you want to expire? Journal archive items, or user archive items, or both? What is the retention category used, and does the category allow deletions? If this is a standard setup (..) it is most likely they have choosen to set retention to 'indefinite'. In the past, I have run expiry on huge journal archives. Expiry is a solid process, and will remove only items meeting the criteria. In general, you expire based on 'modified date', as that is most common. You can choose 'archived date', but that means you might keep items too long.

    I'll attach some queries you can run against EV, to get an estimate. I advise to run expiry outside of the archiving schedule! If expiring journal archives, run in the weekend. 

    Attaching does not seem to work, see below. These queries worked in EV12. I assume they still work in 14/15, but if not, you're probably able to rewrite them.

    Retention Category Check 

    --This gives the archive name and count by RC.
    --Runs against the VaultStore Database
    --Change VAULTSTORENAME to your Vault Store Names

     Use VAULTSTORENAME
     SELECT ex.MbxDisplayName, 
     rc.RetentionCategoryName, 
     COUNT(s.RetentionCategoryIdentity) as 'No. of Items', 
     (a.archiveditemsSize/1024)/1024 as 'Size MB'
     FROM Saveset s
     Join Archivepoint a on a.ArchivePointIdentity =s.ArchivePointIdentity
     Join EnterpriseVaultDirectory.dbo.RetentionCategoryEntry rc on rc.RetentionCategoryIdentity = s.RetentionCategoryIdentity
     Join EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry ex on ex.DefaultVaultID = a.ArchivePointID
     Where rc.RetentionCategoryName = 'Permanent'
     GROUP BY  rc.RetentionCategoryName, ex.MbxDisplayName, a.archiveditemsSize
     ORDER BY ex.MbxDisplayName  
     
     Select a.archivename AS Archive_Name, count(s.idtransaction) AS Items
     From EnterpriseVaultDirectory.dbo.archive A,
     EnterpriseVaultDirectory.dbo.Root R,
     VAULTSTORENAME.dbo.archivepoint AP,
     VAULTSTORENAME.dbo.saveset S
     Where s.archivepointidentity = AP.archivepointidentity
     And AP.archivepointID = r.vaultentryid
     And r.rootidentity = a.rootidentity
     And S.IdDateTime <= 'yyyy-mm-dd 00:00.000'
     Group by archivename
     Order by archivename

    Count items older than retention

    --Change VSDB for Vault Store Database Name
    -- Change yyyy-mm-dd for date-retentioncategory
    Select a.archivename, count(s.idtransaction)
     From EnterpriseVaultDirectory.dbo.archive A,
     EnterpriseVaultDirectory.dbo.Root R,
     VSDB.dbo.archivepoint AP,
     VSDB.dbo.saveset S
     Where s.archivepointidentity = AP.archivepointidentity
     And AP.archivepointID = r.vaultentryid
     And r.rootidentity = a.rootidentity
     And S.IdDateTime <= 'yyyy-mm-dd 00:00.000'
     Group by archivename
     Order by archivename

    Items in Archives with retention categories

    --This gives the archive name and count by RC.
    -- Runs against the VaultStore Database
    -- Change VAULTSTORENAME to your Vault Store Name
    -- Change yyyy-mm-dd to date before you expire, is today-retentioncategorytime
     Use VAULTSTORENAME
     SELECT ex.MbxDisplayName, 
     rc.RetentionCategoryName, 
     COUNT(s.RetentionCategoryIdentity) as 'No Items', 
     (a.archiveditemsSize/1024)/1024 as 'Size MB'
     FROM Saveset s
     Join Archivepoint a on a.ArchivePointIdentity =s.ArchivePointIdentity
     Join EnterpriseVaultDirectory.dbo.RetentionCategoryEntry rc on rc.RetentionCategoryIdentity = s.RetentionCategoryIdentity
     Join EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry ex on ex.DefaultVaultID = a.ArchivePointID
     Where rc.RetentionCategoryName = 'Permanent'
     GROUP BY  rc.RetentionCategoryName, ex.MbxDisplayName, a.archiveditemsSize
     ORDER BY ex.MbxDisplayName  
     
    --Change VaultStoreDV to your Vault Store Database name

     Select a.archivename AS Archive_Name, count(s.idtransaction) AS Items
     From EnterpriseVaultDirectory.dbo.archive A,
     EnterpriseVaultDirectory.dbo.Root R,
     VAULTSTOREDB.dbo.archivepoint AP,
     VAULTSTOREDB.dbo.saveset S
     Where s.archivepointidentity = AP.archivepointidentity
     And AP.archivepointID = r.vaultentryid
     And r.rootidentity = a.rootidentity
     And S.IdDateTime <= 'yyyy-mm-dd 00:00.000'
     Group by archivename
     Order by archivename

    What would expire.

    -- Run against Vault Store Database
    -- Expiry based on Archived Date
    -- Date format is mm/dd/yyyy

     SELECT COUNT(IdTransaction) AS NumberOfItems, SUM(ItemSize)/1024 AS 'TotalSize MB'
     FROM Saveset
     WHERE ArchivedDate < '02/12/2008'

    -- Expiry based on Modified date

      SELECT COUNT(IdTransaction) AS NumberOfItems, SUM(ItemSize)/1024 AS 'TotalSize MB'
      FROM Saveset
      WHERE IdDateTime < '02/12/2008'