SQL to search for Corrupt EV Folder Structure needs "refining"
We have been provided some SQL to report on all archives within our environment that contain a corrupt folder structure and have a ParentFolderRootIdentity of NULL where the folder is anything but; 'Top of Information Store'
The results I get from the following SQL are in the Thousands and I want to be able to group this by Evault Server / Vault Store as the ArchiveFixTool that has to be run against each archive has to be done on the server that the particular archive is located on, AND on an individual Archive each time.
SELECT AV.ArchiveName, AFV.RootIdentity, AFV.FolderName, AFV.ParentFolderRootIdentity, AFV.VaultEntryId, AFV.ContainerRootIdentity, AFV.ArchiveVEID, AFV.Type
FROM ArchiveView AV
INNER JOIN ArchiveFolderView AFV on AFV.ArchiveVEID = AV.VaultEntryID
WHERE AFV.ParentFolderRootIdentity IS NULL and AFV.FolderName <> 'Top of Information Store'
ORDER By AV.ArchiveName
Is anybody able to help me refine this query to include within these results so that it includes a Link to the VaultEntryId as to what VaultStore its located on ?
I want to minimise my workload so that I can action all affected users on one particular VaultStore before moving onto the next one.
Or even better, if you can advise if the ArchiveFixTool can be used in Bulk for all affected Archives based on the results found within this query.
Any Help will be gratefully received,
Thanks in advance,