09-24-2015 01:31 PM
I have the following sql script which shows assign retention categories and item counts for a particular mailbox ID.
USE EnterpriseVaultDirectory
SELECT RetentionCategoryName, RetentionCategoryIdentity
FROM RetentionCategoryEntry
USE EVVSMBXVS_1
SELECT AV.ArchiveName, RCE.RetentionCategoryName, S.RetentionCategoryIdentity, COUNT(*) AS "# of items"
FROM Saveset S
JOIN Vault V
ON S.VaultIdentity = V.VaultIdentity
JOIN EnterpriseVaultDirectory.dbo.root R
ON V.VaultID = R.VaultEntryID
JOIN EnterpriseVaultDirectory.dbo.ArchiveFolderView AFV
ON R.RootIdentity = AFV.RootIdentity
JOIN EnterpriseVaultDirectory.dbo.ArchiveView AV
ON AFV.ArchiveVEID = AV.VaultEntryId
JOIN EnterpriseVaultDirectory.dbo.RetentionCategoryEntry RCE
ON S.RetentionCategoryIdentity = RCE.RetentionCategoryIdentity
WHERE AFV.ArchiveVEID = 'XXXXXXXXXD45EC934E84D392A1D19EB8691110000EVMAILBOX' -- Get this value from the properties of the archive, Advanced tab.
GROUP BY AV.ArchiveName, RCE.RetentionCategoryName, S.RetentionCategoryIdentity
I have a few users who were put in the wrong provisioning group for a period of time and mail may have been archived and expired under a different retention catgory as planned.
If the retention category no longer has anty items since all mail has been expired. Which the assigned retention category still show even though there are no messages in the database anymore?
Thanks
Solved! Go to Solution.
09-26-2015 04:31 PM
Since the SQL query is designed to show count by retention category for items present in the archive, no, you won't see a count of 0 for that retention category.
09-26-2015 12:12 PM
hey paul, i'm not entirely clear on the question. what's the difference if the retention category name shows with a count of zero or if it doesnt show? what do you get when you run the script?
09-26-2015 04:31 PM
Since the SQL query is designed to show count by retention category for items present in the archive, no, you won't see a count of 0 for that retention category.