Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Get all List of all Archives and all relevent information

Created: 27 Jun 2009 • Updated: 30 Jun 2009 | 6 comments
Wayne Humphrey's picture
+8 8 Votes
Login to vote

Get all List of all Archives and display the following:

-- Mailbox
-- Exchange Server
-- Number of Items (Mailbox)
-- Number of (Archive)
-- Mailbox Size (MB)
-- Archive Size (MB)
-- Total Size (MB)
-- Archive Created
-- Archive Updated

Comments 6 CommentsJump to latest comment

jprknight's picture

This is a really nice script. I am going to wrap it up in some vbscript for formatted output to a .csv file. :)

I just have one question; What is Exchange State? I have never heard of it before now.

Thanks again,

Jeremy.

0
Login to vote
Paul Grimshaw's picture

MbxExchangeState 0=Normal,1=Deleted,2=Hidden

EV Backline Technical Support Engineer APJ Region

+1
Login to vote
MatsHolm's picture

Hi!

Tried to run this on my EV SQL server but gets:

Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVAmericasVaultStore04..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVAPJVaultStore01..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS11..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS2..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS3..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS4..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS5..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS6..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS7..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS8..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVEVGlobal1MailboxVS9..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVjournalingVaultstore..ArchivePoint'.
Server: Msg 208, Level 16, State 1, Line 22
Invalid object name 'EVMailboxVaultstore1..ArchivePoint'.

What do I need to edit to make the script to work?

0
Login to vote
GertjanA's picture

Hi Mats,

Not sure if you found this already, or have solved it yourself, but what you need to adjust is in the following:

FROM
EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry AS EME,
EnterpriseVaultDirectory.dbo.ExchangeServerEntry AS ESE,
EVAmericaseVaultStore..ArchivePoint AS VS1

You need to replace EVAmericaVaultStore with the name of the vaultstore as you use. Additionally, if you check the script, it does a union for other stores. You need to adjust those also. Also take in account to remove unused unions...

Regards

Thank you, Gertjan, MCSE, MCITP,MCTS, SCS, STS
Company: www.t2.nl

www.quadrotech-it.com

www.symantec.com/vision

+1
Login to vote
John Santana's picture

Thank you for sharing the script, however, I got this error:

SELECT LEFT(mbxdisplayname, 20)                   AS 'Mailbox', 
       exchangecomputer                           AS 'Exchange Server', 
       mbxitemcount                               AS '#Items (Mailbox)', 
       VS1.archiveditems                          AS '#Items (Archive)', 
       mbxsize / 1024                             AS 'Mbx Size (MB)', 
       VS1.archiveditemssize / 1024               AS 'Archive Size(MB)', 
       ( mbxsize + VS1.archiveditemssize ) / 1024 AS 'Total Size(MB)', 
       VS1.createddate                            AS 'Archive Created', 
       VS1.modifieddate                           AS 'Archive Updated', 
       mbxexchangestate                           AS 'Exchange State' 
FROM   enterprisevaultdirectory.dbo.exchangemailboxentry AS EME, 
       enterprisevaultdirectory.dbo.exchangeserverentry AS ESE, 
       evvaultstore1..archivepoint AS VS1 
WHERE  EME.defaultvaultid = VS1.archivepointid 
       AND EME.mbxarchivingstate = 1 
       AND EME.exchangeserveridentity = ESE.exchangeserveridentity
 
Msg 207, Level 16, State 1, Line 16
Invalid column name 'exchangeserveridentity'.
 
when I executed against the EV 9.0.4 DB on my Exchange Server 2007 ?

Kind regards,

John Santana
IT Professional

--------------------------------------------------

Please be nice to me as I'm newbie in this forum.

0
Login to vote