08-10-2012 09:13 AM
EV SQL Query to list Mailbox display name, Exchange server name, Mailbox Database name, Vault store name
& OU?
Solved! Go to Solution.
08-10-2012 10:24 AM
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database", EME.AdMbxDN "AD Details", VSE.VaultStoreName "Vault Store" FROM ExchangeMailboxEntry EME, ExchangeMailboxStore EMS, ExchangeServerEntry ESE, Root R, Archive A, VaultStoreEntry VSE WHERE EME.MbxStoreIdentity = EMS.MbxStoreIdentity AND EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity AND EME.DefaultVaultId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.VaultStoreEntryId = VSE.VaultStoreEntryId ORDER BY ESE.ExchangeComputer, EMS.Name, EME.MbxDisplayName
AD Details column will give a result like
CN=My User,OU=Accounting,OU=Company OUs,DC=ENTERPRISE,DC=VAULT
The OU after the name will be the OU they belong to, and the OU after is the OU that contains that OU etc
08-10-2012 10:24 AM
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database", EME.AdMbxDN "AD Details", VSE.VaultStoreName "Vault Store" FROM ExchangeMailboxEntry EME, ExchangeMailboxStore EMS, ExchangeServerEntry ESE, Root R, Archive A, VaultStoreEntry VSE WHERE EME.MbxStoreIdentity = EMS.MbxStoreIdentity AND EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity AND EME.DefaultVaultId = R.VaultEntryId AND R.RootIdentity = A.RootIdentity AND A.VaultStoreEntryId = VSE.VaultStoreEntryId ORDER BY ESE.ExchangeComputer, EMS.Name, EME.MbxDisplayName
AD Details column will give a result like
CN=My User,OU=Accounting,OU=Company OUs,DC=ENTERPRISE,DC=VAULT
The OU after the name will be the OU they belong to, and the OU after is the OU that contains that OU etc
08-10-2012 10:25 AM
Try the below query against 'Directory Database',
select MbxDisplayName [Display Name]
,ServerName [Exchange Server]
,Name [Mailbox Database]
,VaultStoreName [Vault Store Name]
,ADMbxDN [OU]
From [EnterpriseVaultDirectory].[dbo].[ExchangeMailboxEntry]
,[EnterpriseVaultDirectory].[dbo].[ExchangeMailboxStore]
,[EnterpriseVaultDirectory].[dbo].[VaultStoreEntry]
08-10-2012 01:37 PM
Thanks!!!