cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Journal Mailbox

San_Bangalore
Level 5

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

5 REPLIES 5

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

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

Regards. Gertjan

San_Bangalore
Level 5

I have attached the image which I am looking for. Basicall I am looking for all the Journal Target - Archive names.

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

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?

Regards. Gertjan

Pradeep-Papnai
Level 6
Employee Accredited Certified

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

Arnold_Mathias
Level 1

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