cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query Vaultid and mbxdisplayname

Steve_Slater
Level 3

Tring to find a simple sql query to return the mailbox name and the associated vault id.

1 ACCEPTED SOLUTION

Accepted Solutions

JesusWept3
Level 6
Partner Accredited Certified
Far easier way would be SELECT MbxDisplayName, DefaultVaultId FROM ExhangeMailboxEntry WHERE DefaultVaultId IS NOT NULL ORDER BY MbxDisplayName
https://www.linkedin.com/in/alex-allen-turl-07370146

View solution in original post

4 REPLIES 4

GabeV
Level 6
Employee Accredited

Hello Steve,

Try this SQL query:

USE EnterpriseVaultDirectory
SELECT     EME.MbxDisplayName AS [Mailbox Name], ESE.ExchangeComputer AS [Exchange Server], EMS.Name AS [Exchange Database], ArchiveView.ArchiveName,
                      ArchiveView.VaultEntryId
FROM         ExchangeMailboxEntry AS EME INNER JOIN
                      ExchangeMailboxStore AS EMS ON EME.MbxStoreIdentity = EMS.MbxStoreIdentity INNER JOIN
                      ExchangeServerEntry AS ESE ON EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity INNER JOIN
                      Root AS R ON EME.DefaultVaultId = R.VaultEntryId INNER JOIN
                      ArchiveView ON R.RootIdentity = ArchiveView.RootIdentity
ORDER BY [Exchange Server], [Exchange Database], [Mailbox Name]

https://www-secure.symantec.com/connect/forums/ev-sql-query-list-all-maiboxes-mailboxes-and-out-ev-archives-mailbox-display-name-exchange-se

I hope this helps.

Steve_Slater
Level 3

Perfect!  Thank you very much.

GabeV
Level 6
Employee Accredited

You're welcome!

JesusWept3
Level 6
Partner Accredited Certified
Far easier way would be SELECT MbxDisplayName, DefaultVaultId FROM ExhangeMailboxEntry WHERE DefaultVaultId IS NOT NULL ORDER BY MbxDisplayName
https://www.linkedin.com/in/alex-allen-turl-07370146