cancel
Showing results for 
Search instead for 
Did you mean: 

check number of emails in archive folder

Y1251
Level 4

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

 

4 REPLIES 4

VirgilDobos
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

--Virgil

CConsult
Moderator
Moderator
Partner    VIP   

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

 

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"?

Marcde
Moderator
Moderator
Partner    VIP    Accredited

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

PMCS GmbH & Co. KG - A Serviceware Company
www.serviceware.de