08-09-2012 02:11 PM
EV SQL Query to list all the maiboxes (mailboxes With and with out EV archives): Mailbox display name, Exchange server name, Mailbox Database name & Vault store name?
Solved! Go to Solution.
08-09-2012 02:54 PM
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database", 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
08-09-2012 02:54 PM
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database", 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
08-09-2012 03:02 PM
oh and that above will only report on users that have been enabled for Enterprise Vault.
If they are not, then you can't report on their vault store if they dont have an archive to tie to a vault store to begin with.
08-09-2012 03:40 PM
Thanks!!!
is that possible to report all mailboxes in the organisation? if EV is not enabled then EV vault store should be blank.
08-09-2012 04:20 PM
It can only report on SQL based on whats been provisioned
so if you have 100,000 mailboxes in your environment, but you only provision say 10,000 mailboxes, you can only possibly report on 10,000 mailboxes
Anywho, you'll have to run two queries.
First one as above being those who have vault stores.
And then for the mailboxes that aren't enabled you would do
SELECT EME.MbxDisplayName "Mailbox Name", ESE.ExchangeComputer "Exchange Server", EMS.Name "Exchange Database" FROM ExchangeMailboxEntry EME, ExchangeMailboxStore EMS, ExchangeServerEntry ESE WHERE EME.MbxStoreIdentity = EMS.MbxStoreIdentity AND EMS.ExchangeServerIdentity = ESE.ExchangeServerIdentity AND EME.DefaultVaultId = '' ORDER BY ESE.ExchangeComputer, EMS.Name, EME.MbxDisplayName
08-09-2012 04:52 PM
Thanks!!!
08-09-2012 10:27 PM
For the first query, I also need OU. Can you please add OU to it?
08-19-2012 10:02 PM
Hi,
can somene please clarify that if the script above script is working for EV 8.0 with Exchange Server 2007 ?
because I got this error: