SQL Query to get Archive size
Hello all,
I am sure I have seen these kind of queries, but cannot locate them.I am (un)fortunately not an SQL-person, so I am unable to compose such a query myself...
I need to get a list that shows the number of items and the size of certain archives.
We currently do not have SQL-reporting available. The usage-report is to slow to be used due to the amount of archives.
Does anyone have a query at hand that will allow me to show this info quickly?
Thanks!
Gertjan
A slower, slightly more silly query would be the following (but might be more accurate and what you're looking for
SELECT A.ArchiveName, COUNT(S.IdTransaction) "Num. Items Archived", SUM(S.ItemSize)/1024 "Archived Items Size (MB)", SUM(SP.OriginalSize)/1024/1024 "Original Email Size (MB)" FROM EnterpriseVaultDirectory.dbo.Archive A, EnterpriseVaultDirectory.dbo.Root R, yourVaultStoreDB.dbo.ArchivePoint AP, yourVaultStoreDB.dbo.Saveset S, yourVaultStoreDB.dbo.SavesetProperty SP WHERE S.SavesetIdentity = SP.SavesetIdentity AND S.ArchivePointIdentity = AP.ArchivePointIdentity AND AP.ArchivePointId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.ArchiveName = 'your User' GROUP BY A.ArchiveName
Remember that if you have users across multiple stores, you will have to run this against each individual vault store, if you want to specify multiple users, do
A.ArchiveName IN ('yourUser1','yourUser2','yourUser3')

