So, I've been cobbling together a few SQL queries lately that help get large amounts of information from EV. I figured I'd provide one of these to everyone. As I post these queries I will also provide the information it gathers below so people know what they are looking at. I hope these queries are as helpful to others as they have been for me.
(Note: As we cannot take into consideration every environment, please run these queries with caution as they MAY cause performance issues while being run)
-- Start Query
-- Prerequisite : Must be run on SQL instance with EnterpriseVaultDirectory DB
-- End Query
a. If the entry refers to a folder within the archive or the archive itself.
b. What type of Archive is it (Ex. Mailbox, Journal, FSA, Shared, etc)
c. If the Archive is currently associated with a Mailbox.
- Ex. If there are 2 archives for 1 user, only one archive can be currently associated with the mailbox. This is the active archive.
d. If the entry associated with the archive is a folder, what is the foldername.
e. 'ArchiveID - FolderID if ArchiveName = Folder' : Archive ID if entry is an archive, FolderID if a folder in the archive.
f. SQLServer : SQL Server Instance
h. DatabaseName = VaultStoreDBName