cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query to find out archived mail in each 1, 2, 5 year retention periods?

rajesh_velagapu
Level 4

 

Enterprise Vault version: EV

SQL query to find out archived mail in each 1, 2, 5 year retention periods?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

I think this should work:


--Runs against the VaultStore Database
SELECT rc.RetentionCategoryName, COUNT(s.RetentionCategoryIdentity) as Count
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
GROUP BY  rc.RetentionCategoryName

and this one includes size

--This gives the count and size by RC.
--Runs against the VaultStore Database
SELECT rc.RetentionCategoryName, COUNT(s.RetentionCategoryIdentity) as Count, SUM (s.ItemSize)/1024 as 'Size'
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
GROUP BY  rc.RetentionCategoryName

View solution in original post

3 REPLIES 3

rajesh_velagapu
Level 4

 

Enterprise Vault version: EV 10

SQL query to find out archived mail in each 1, 2, 5 year retention periods?

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

I think this should work:


--Runs against the VaultStore Database
SELECT rc.RetentionCategoryName, COUNT(s.RetentionCategoryIdentity) as Count
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
GROUP BY  rc.RetentionCategoryName

and this one includes size

--This gives the count and size by RC.
--Runs against the VaultStore Database
SELECT rc.RetentionCategoryName, COUNT(s.RetentionCategoryIdentity) as Count, SUM (s.ItemSize)/1024 as 'Size'
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
GROUP BY  rc.RetentionCategoryName

rajesh_velagapu
Level 4

Thanks!