Need Help w a SQL Query
Created: 05 Nov 2012 | Updated: 05 Nov 2012 | 5 comments
This issue has been solved. See solution.
Can someone help me with a SQL Query that will report the last archive time for archive-enabled mailboxes?
Thanks for any help!!
Discussion Filed Under:
Comments 5 Comments • Jump to latest comment
This should do it, runs against the vault store db:
SELECT ex.MbxDisplayName,a.archiveditems as Count, max(s.archiveddate) as LastArchived
FROM Saveset s
Join Archivepoint a on a.ArchivePointIdentity =s.ArchivePointIdentity
Join EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry ex on ex.DefaultVaultID = a.ArchivePointID
WHERE ex.mbxarchivingstate = 1
GROUP BY ex.MbxDisplayName, a.archiveditems, a.archiveditemssize
Tony Sterling
www.bluesource.net or www.bluesource.co.uk
Offices in the US and the UK
Tony, when I run this, I get all archives/mbx's. Can you help me get just mbxs enabled for archiving?
and I see where it says .. WHERE ex.mbxarchivingstate = 1
Seems like it should work.
Tony... Accept my apologies. I didn't copy the whole query to SQL
Cool deal, glad it is working.
Tony Sterling
www.bluesource.net or www.bluesource.co.uk
Offices in the US and the UK
Would you like to reply?
Login or Register to post your comment.