SQL Query to show the total number of archived items per archive and per vault store

Article: 100009134
Last Published: 2015-05-18
Ratings: 0 0
Product(s): Enterprise Vault

Problem

At times it may be required to check the number of items which are archived in a particular user's archive.

Solution

Method 1 - Usage.asp
From the Enterprise Vault server, navigate to the following link: https://localhost/enterprisevault/usage.asp
 

Method 2a: - All users
1. Run the query below:

Note: Replace VaultStoreDatabase with the name of the database for the vault store

USE VaultStoreDatabase
SELECT AV.ArchiveName, vAP.ArchivedItems
FROM view_ArchivePoint vAP INNER JOIN
EnterpriseVaultDirectory.dbo.ArchiveView AV ON AV.VaultEntryId = vAP.ArchivePointId
ORDER BY ArchivedItems ASC


This will return all mailbox archives with the number of archived items.

Method 2b - Specific User:
To locate a specific user:

  1. Open the Enterprise Vault Administration Console.
  2. Expand Directory - Site - Archives and select the relevant container where the archive resides.
  3. Find the archive for the specific user.
  4. Double click on the archive.
  5. Click on the Advanced Tab.
  6. Copy the Archive ID value.
  7. Launch Microsoft SQL Server Management Studio and run the below query to check the 'number of savesets' which have been archived for a particular archive.

Note: Replace VaultStoreDatabase with the name of the database for the vault store and replace ' ArchiveIDFromConsole'  with the Archive ID copied previously.

USE VaultStoreDatabase
SELECT AV.ArchiveName, vAP.ArchivedItems
FROM view_ArchivePoint vAP INNER JOIN
EnterpriseVaultDirectory.dbo.ArchiveView AV ON AV.VaultEntryId = vAP.ArchivePointId
WHERE vAP.ArchivePointId = 'ArchiveIDFromConsole'

Was this content helpful?