rajesh_velagapu
13 years agoLevel 4
SQL Query to find archived messages & archive item size in a specified period?
1) SQL Query to find archived messages & archive item size in a specified period?
And
2) EV server has 2 differnt mailbox archiving tasks, SQL query to find archive items and
size for each task (each mailbox server) in a specified period?
Example: SQL Query to find archived messages processed in a specified period?
select count(*) as '4/12'
from saveset
where archiveddate >= '4/12/2011' and archiveddate < '4/13/2011'
This query should work for you
SELECT ESE.ExchangeComputer "Exchange Server", COUNT(S.IdTransaction) "Items Archived", SUM(S.ItemSize)/1024 "Size of Items (MB)" FROM EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry EME, EnterpriseVaultDirectory.dbo.ExchangeMailboxStore EMS, EnterpriseVaultDirectory.dbo.ExchangeServerEntry ESE, yourVaultStore.dbo.ArchivePoint AP, yourVaultStore.dbo.Saveset S WHERE S.ArchivePointIdentity = AP.ArchivePointIdentity AND AP.ArchivePointId = EME.DefaultVaultId AND EME.MbxStoreIdentity = EMS.MbxStoreIdentity AND EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity AND S.ArchivedDate > DATEADD(d, -1, getDate()) GROUP BY ESE.ExchangeComputer