截屏视频帮助
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Need Help w a SQL Query

创建时间: 05 11 月 2012 • Updated: 05 11 月 2012 | 5 条评论
Scott _Hastings 的图片
此问题已解决。 请查看解决方案。

Can someone help me with a SQL Query that will report the last archive time for archive-enabled mailboxes?

Thanks for any help!!

讨论 归类至以下社区:

评论 条评论跳转至最新评论

TonySterling 的图片

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

解决方案
Scott _Hastings 的图片

Tony, when I run this, I get all archives/mbx's. Can you help me get just mbxs enabled for archiving?

Scott _Hastings 的图片

and I see where it says .. WHERE ex.mbxarchivingstate = 1

Seems like it should work.

Scott _Hastings 的图片

Tony...  Accept my apologies. I didn't copy the whole query to SQL sad

TonySterling 的图片

Cool deal, glad it is working.