EV SQL Query to show Archive Size Info and User Mapping
I have 2 sql queries, 1 which shows a list of all my archives and their sizes:
SELECT [ArchiveName], ArchivedItems, CAST(ArchivedItemsSize AS decimal(20, 0)) AS ArchivedItemsSize, ModifiedDate From view_ListVaults INNER JOIN [EnterpriseVaultDirectory].[dbo].[ArchiveView] ON view_ListVaults.ArchivePointId = [EnterpriseVaultDirectory].[dbo].[ArchiveView].[VaultEntryId]
and one which shows
Mailbox name and the excahneg info for that archive:
Ideally i would like to combine these 2 to show the archive name size or archive number of items modified data and the billing username or smtp adderss associated with the archive.
Any help please?
Hi Shaun,
I've had a go at merging your two queries. Run the following against the vault store database you want to see the archives for. If you have multiple you will have to run this a few times.
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database", EME.AdMbxDN "AD Details", VSE.VaultStoreName "Vault Store", AV.ArchiveName, vLV.ArchivedItems, CAST(vLV.ArchivedItemsSize AS decimal(20, 0)) AS ArchivedItemsSize, vLV.ModifiedDate From view_ListVaults vLV, [EnterpriseVaultDirectory].[dbo].[ArchiveView] AV, [EnterpriseVaultDirectory].[dbo].[ExchangeMailboxEntry] EME, [EnterpriseVaultDirectory].[dbo].[ExchangeMailboxStore] EMS, [EnterpriseVaultDirectory].[dbo].[ExchangeServerEntry] ESE, [EnterpriseVaultDirectory].[dbo].[Root] R, [EnterpriseVaultDirectory].[dbo].[Archive] A, [EnterpriseVaultDirectory].[dbo].[VaultStoreEntry] VSE WHERE vLV.ArchivePointId = AV.VaultEntryId AND EME.MbxStoreIdentity = EMS.MbxStoreIdentity AND EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity AND EME.DefaultVaultId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.VaultStoreEntryId = VSE.VaultStoreEntryId AND R.RootIdentity = AV.RootIdentity
I hope this helps you, if it does please mark as a solution.
Many Thanks,
Chris Colden