12-30-2014 02:50 AM
We have Journaling environment, running Journaling for Exchange 2007 and EV version 10.0.4
I am looking for a SQL query which finds the target archive in Journal Mailbox Properties.
Targets - > Exchange - > domain - > Exchange server name - > Journal Mailbox - > Journal mailbox properties - > Archive
12-30-2014 03:14 AM
Hello,
I am not sure what you are asking, but I believe you can use the directory database to run :
select * from JournalingTarget
that gives you the ExchangeMailboxEntryID, which can be used to run on the ExchangeMailboxEntry table:
Select *
From ExchangeMailboxEntry
Where ExchangeMailboxEntryId = 'ExchangeMailboXEntryID'
That gives you the Journal mbx name
12-30-2014 03:52 AM
I have attached the image which I am looking for. Basicall I am looking for all the Journal Target - Archive names.
12-30-2014 04:08 AM
select *
from Archive
Where ArchiveTypeIdentity = '3'
Gives you all Journal Archives. I am not sure you can use SQL to find exactly what you need.
When you run:
select *
from ExchangeMailboxEntry
Where ExchangeMbxType = '2'
That gives you the journalmailboxes, you can use the DefaultVaultId from the result to find the belonging archives?
12-30-2014 10:22 PM
Let's try following query:-
USE EnterpriseVaultDirectory
SELECT
EME.MbxDisplayName,
EME.MbxDisplayName,
AV.ArchiveName,
AV.VaultEntryId ArchiveID
FROM ExchangeMailboxEntry EME
INNER JOIN ArchiveView AV ON AV.VaultEntryId = EME.DefaultVaultId
WHERE ExchangeMbxType = 2
06-21-2015 01:31 AM
Improving on Pradeep_Papnai's query, we use the following to get a simplified view of journal targets vs. archive names vs. journal tasks
Use EnterpriseVaultDirectory SELECT e.MbxDisplayName,AV.ArchiveName,t.Name,ArchiveEnabled FROM [EnterpriseVaultDirectory].[dbo].[JournalingTarget] "j" JOIN [EnterpriseVaultDirectory].[dbo].[Task] "t" ON t.TaskEntryId = j.TaskEntryId JOIN [EnterpriseVaultDirectory].[dbo].ExchangeMailboxEntry "e" ON e.ExchangeMailboxEntryId = j.ExchangeMailboxEntryId INNER JOIN [EnterpriseVaultDirectory].[dbo].ArchiveView AV ON AV.VaultEntryId = e.DefaultVaultId Order by e.MbxDisplayName