Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Information Store statistics

Status
Not open for further replies.

cdgtech

MIS
May 6, 2004
9
0
0
US
Is there a way to determine the mailbox breakdown for the entire Information Store? I want to be able to see the total items and MB for the Inbox, Deleted Items, Sent Items, etc. I'd also like to break it down by user for that same info.
 
You can see the mailbox sizes by drilling into the "Mailboxes" on the Storage Group in ESM.

AS for the size by folder, not sure.
 
I've found out that much, so I can at least see what each individual's mailbox size is. But I'd like to be able to see how much of the database is being consumed by Deleted Items that no one seems to empty out. I know I can force a cleaning of the Deleted Items but management is against this (as usual). If I could determine the biggest offenders I might be able to do something about it on a user by user basis.

As a bonus, I'd like to find out about attachments, since many people are sharing video files (and you know how that goes). I know I can block that too but once again management blocks that course of action.
 
Multiple Attachements are that big of a problem, internally exchange only keeps 1 copy of a file and uses pointers for the users.

So a user mails the same attachment to 50 users, only 1 file is stored in the DB.
 
I don't think my programming skills are up to this, but I'll give it a shot.

Hasn't anyone out there created a tool do this yet?
 
Yes, but I posted that link as its CDO. There was a guy on OutlookExchange.com who made an Access database to get all of this info on a daily basis with cool reports all in Access. I've covered it in this forum and the Exchange 2000 forum several times over the past few years but I can't find it on their site now. I can't even remember the gus name.
 
The easiest way of doing this is to reenable the virtual drive M and then drill into it using a script. I wouldn't alter anything in there though.

We use a script below to count the number of items in the inbox and sent items by accessing the folder properties and then push the contents into a sql database.

On error resume next

Dim ConnLogin
Dim Username
Dim MailNickNameEx
Dim StoreInboxPath
Dim StoreSentItemsPath
Dim InboxItemsCount
Dim SentItemsCount
Dim StrSqlP1
Dim StrSqlP2
Dim StrSqlM1


set ConnLogin = CreateObject("ADODB.Connection") 'Define SQL Connection
ConnLogin.Open = "Provider=SQLOLEDB;Data Source=SQLSERVER;Initial Catalog=PCAudit;Uid=USER;pwd=PASSWORD" 'Open SQL connection for Input
StrSqlP1 = "INSERT into PCAudit.dbo.MailboxProcess (ProcessTypeDB, LastUpdate) VALUES ('Started', GetDate())"
ConnLogin.Execute StrSqlP1 'Record the process start
'wscript.echo StrSqlP1
Set objConnection = CreateObject("ADODB.Connection") ' Open ADODB Connection
Set objCommand = CreateObject("ADODB.Command") ' Open ADODB Command
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objcommand.CommandText = "<LDAP://dc=DOMAINNAME,dc=Com>;(&(objectCategory=User)" & "(userAccountControl:1.2.840.113556.1.4.803:=0));mailNickName,sAMaccountname;Subtree"
' The =0 section at the end of the search string returns only enabled users. Changing this to =2 will only return disabled users.
' ObjectCategory=User only returns objects that are users.
' mailnickname is the only field we are interested in returning into the recordset.
set objrecordset = objcommand.Execute 'Open Active Directory and retrieve only users

Set objFSO = CreateObject("Scripting.FileSystemObject") 'Open the file system
objrecordset.movefirst
do until objrecordset.EOF
Username = "" 'Clear Variables
MailnickNameEx = ""
StoreInboxPath = ""
StoreSentItemsPath = ""
InboxItemCount = 0
StoreSentItemsCount = 0
MailNickNameEx = objRecordSet.Fields("mailNickName")
Username = objRecordSet.Fields("sAMaccountname")
If username <> "" Then 'Ignore users with no mail nickname
If MailNickNameEx <> "" Then
StoreInboxPath = "M:\DOMAINNAME.CO.UK\MBX\" & MailNickNameEx & "\Inbox" 'setup path to inbox
StoreSentItemsPath = "M:\DOMAINNAME.CO.UK\MBX\" & MailNickNameEx & "\Sent Items" 'setup path to sent items
Set objFolder = objFSO.GetFolder(StoreInboxPath)
InboxItemCount = objFolder.Files.Count 'Count Inbox Items
Set objFolder = objFSO.GetFolder(StoreSentItemsPath)
SentItemCount = objFolder.Files.Count 'Count Sent Items
StrSqlM1 = "INSERT into PCAudit.dbo.MailBoxFolderCount (UsernameDB, MailNickNameDB, InboxItemCountDB, SentItemsCountDB, LastUpdate) VALUES ('" & Username & "','" & MailNickNameEx & "','" & InboxItemCount & "','" & SentItemCount & "', GetDate())"
'wscript.echo StrSqlM1 'Use In Debug
ConnLogin.Execute StrSqlM1 'Record Data into SQL

End If
End If
objrecordSet.MoveNext

Loop

StrSqlP2 = "INSERT into PCAudit.dbo.MailboxProcess (ProcessTypeDB, LastUpdate) VALUES ('Finished', GetDate())"
ConnLogin.Execute StrSqlP2 'record process finishing





Chris Styles

NT4/2000 MCSE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top