05-04-2020 09:46 PM
Hi,
May i know is any mothed to check number of emails in a archive folder in user ev strucutre backend?
output:
Ryan-archive
|_Folder1 (number of emails 200)
|_Folder2 (number of emails 300)
|_Folder3 (number of emails 250)
Thx
05-05-2020 03:48 AM
Hi there,
You could try using below SQL query against the Vault Store Database:
SELECT FolderName, COUNT(*) as ItemCount --, FolderPath FROM [view_Saveset_Archive_Vault] a INNER JOIN [EnterpriseVaultDirectory].dbo.ArchiveFolderView b ON a.VaultID = b.VaultEntryId WHERE ArchivePointId = '14E72097B8240CB43A18DBB6AFCEE56D71110000rowi01-ev-01.rowiev.local' GROUP BY FolderName
Example output: FolderName ItemCount Inbox 1 Sent Items 2 Top of Information Store 1
The archive ID can be found from the Vault Admin Console, by looking at the properties of the archive.
05-06-2020 12:15 AM
Hi,
you can also use this sql query to also get the archive name.
Set the archiveID in the where statement, otherwise it will search it for every archive.
____________
SELECT
Archive.ArchiveName,
ArchiveFolder.FolderName,
COUNT(*) as itemsPerFolder,
Vault.ArchivedItems,
vault.ArchivedItemsSize
FROM
EnterpriseVaultDirectory.dbo.root r1
LEFT JOIN EnterpriseVaultDirectory.dbo.Root r2 on r1.RootIdentity = r2.ContainerRootIdentity
JOIN EnterpriseVaultDirectory.dbo.Archive on r1.RootIdentity = archive.RootIdentity
LEFT JOIN EnterpriseVaultDirectory.dbo.ArchiveFolder on r2.RootIdentity = ArchiveFolder.RootIdentity
RIGHT JOIN EVVSMBXStore01_1.dbo.Vault on r2.VaultEntryId = Vault.Vaultid
JOIN EVVSMBXStore01_1.dbo.ArchivePoint AP on Vault.ArchivePointIdentity = AP.ArchivePointIdentity
JOIN EVVSMBXStore01_1.dbo.Saveset on Vault.VaultIdentity = Saveset.VaultIdentity
/*use below where conditions to narrow down. If two archives have same name, use archive id
WHERE
ArchivePointId='XXXX' */
GROUP BY
Archive.ArchiveName,
ArchiveFolder.FolderName,
Vault.ArchivedItems,
vault.ArchivedItemsSize
__________
results will be like this:
archivename, Foldername, items per folder, items archived, Size of items in folder
regards
05-06-2020 01:21 AM
Hi Virgil,
Thanks, as i try to run the sql and hceck the ArchivePointId, but show below message :"Msg 208, Level 16, State 1, Line 1
Invalid object name 'view_Saveset_Archive_Vault'." may i know should i change the valut "view_Saveset_Archive_Vault"?
05-06-2020 02:11 AM - edited 05-06-2020 02:12 AM
Hi,
you need to execute Virgils query against the vaultstore database where the archive in question resides in.
Just add the follwing line in front of the query:
USE <NameOfVaultStoreDB>
Regards
Marc