02-15-2013 01:59 PM
Hello Everyone,
Been trying to get a solution through writing SQL query but it just isn't quite meeting my expectations. I want a report that shows the size taken on the disk per partition.
I have tried 2 methods so far and neither one give me correct numbers.
Query 1 looked in the PartitionDB at the Saveset table
grouped by column IdPartition and sum on the column ItemSize
Query 2 looked at the fingerprint DB at the MemberTable_XXX tables
union all of them together into temp table, then grouped by column PartitionIdentity and sum by column StoreSize
I contacted support but they said the best bet would be to go here, which makes sense.
Has anyone done this successfully?
Solved! Go to Solution.
02-16-2013 09:17 AM
It is absolutely quick!!
in fact its probably a lot quicker than doing a SUM against the messages
So the reason for the item sizes in EV is for EV Quota Usage and how much data you have taken from exchange, none of the reports will truly reflect on how much data is being used on disk because of single instancing, the size of the DVS, DVSCC, DVSSP etc
But honestly, try a query such as this in a large environment and it will take quite a while
SELECT VSE.VaultStoreName "Vault Store", PE.PartitionName "Partition Name", PE.PartitionRootPath "Partition Path", COUNT(S.IdTransaction) "No. Archived Items", SUM(CAST(S.ItemSize AS BIGINT))/1024 "Size Of Items (MB)" FROM EnterpriseVaultDirectory.dbo.Archive A, EnterpriseVaultDirectory.dbo.Root R, EnterpriseVaultDirectory.dbo.VaultStoreEntry VSE, EnterpriseVaultdirectory.dbo.PartitionEntry PE, EVVSYourStore_1.dbo.ArchivePoint AP, EVVSYourStore_1.dbo.Saveset S WHERE S.ArchivePointIdentity = AP.ArchivePointIdentity AND AP.ArchivePointId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.VaultStoreentryId = VSE.VaultStoreEntryId AND S.IdPartition = PE.IdPartition AND VSE.VaultStoreEntryId = PE.VaultStoreEntryId GROUP BY VSE.VaultStoreName, PE.PartitionName, PE.PartitionRootPath ORDER BY VSE.VaultStoreName
02-15-2013 02:25 PM
this really isnt going to come from EV. you should query it either via Windows (WMI or something) or from your storage side (LUN sizes or whatever you use.)
02-15-2013 03:23 PM
02-16-2013 05:39 AM
Well then what is the point in all of this size data in the SQL databases?
I wanted to be able to pull something quickly from SQL, and pulling it from WMI or Windows is NOT quick at all.
02-16-2013 09:05 AM
your analogy is like saying you want to go to walmart to book a flight. you have to go to expedia or orbitz to book a flight because that's where flights are booked.
02-16-2013 09:17 AM
It is absolutely quick!!
in fact its probably a lot quicker than doing a SUM against the messages
So the reason for the item sizes in EV is for EV Quota Usage and how much data you have taken from exchange, none of the reports will truly reflect on how much data is being used on disk because of single instancing, the size of the DVS, DVSCC, DVSSP etc
But honestly, try a query such as this in a large environment and it will take quite a while
SELECT VSE.VaultStoreName "Vault Store", PE.PartitionName "Partition Name", PE.PartitionRootPath "Partition Path", COUNT(S.IdTransaction) "No. Archived Items", SUM(CAST(S.ItemSize AS BIGINT))/1024 "Size Of Items (MB)" FROM EnterpriseVaultDirectory.dbo.Archive A, EnterpriseVaultDirectory.dbo.Root R, EnterpriseVaultDirectory.dbo.VaultStoreEntry VSE, EnterpriseVaultdirectory.dbo.PartitionEntry PE, EVVSYourStore_1.dbo.ArchivePoint AP, EVVSYourStore_1.dbo.Saveset S WHERE S.ArchivePointIdentity = AP.ArchivePointIdentity AND AP.ArchivePointId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.VaultStoreentryId = VSE.VaultStoreEntryId AND S.IdPartition = PE.IdPartition AND VSE.VaultStoreEntryId = PE.VaultStoreEntryId GROUP BY VSE.VaultStoreName, PE.PartitionName, PE.PartitionRootPath ORDER BY VSE.VaultStoreName
02-17-2013 11:49 PM
Hello, I use a powershell/wmi query as attached. Found that somewhere.
I use a txt file that lists the servers I want to query. It has builtin send function, you need to define a sender (can be anything, not necessarily an existing mailbox), the recipient, subject and smtp-server. This creates an HTML page. It looks for folders (in the script, Name like %EVIndex% (and %EVStorage%), and makes a nice HTML view.
EVindex and EVStorage are the names we use here for locations, can differ at your site.
Result file will be stored in a subfolder called OLD.
02-20-2013 10:21 PM
Thanks for sharing the great information and the SQL + Powershell script guys !