Get the size of a user's mail database while in the Domino Directory

Ever been in the Domino Directory and want to know the size of a mail database without doing a database properties check?

Have you ever been in the Domino Directory and wanted to know the size of a mail database without having to go out and do a database properties check? Maybe you have the smart icon that opens the user's mail database from the address book and you're wondering if you should open up the database - what if it's 600 mb? Here's a way to use a smarticon to check the size of a mail database while in in the Domino Directory. The instructions are in the code. The only caveat is that it will give an ESA and you will need to click on "Trust Signer" if you want, or "Execute Once" if you want to maintain security of No Signature for "Access to current database" and Access to external code".

		*****   SUMMARY   *****
SET Consulting, Inc.  Scott E. Thompson
This script will get the size of the database on selected person documents in
the Domino directory. It can be implemented in two ways: 1) put as an agent in the Domino Directory and run from a menu or
create an action in a view to run the agent (however, you may not want to modify your directory)
2) it can be placed as an agent in the Notes administrator's mail file
and then create a smart icon that calls to the agent. HOW TO DO THIS: a. Create a shared agent in the mail file and paste this script into
the "Initialize" section between Sub and End Sub. (It must be
set to run LotusScript) b. Have the agent run "Manually From Agent List" c. Save the agent as "Check Size" d. Create a smart icon by choosing File, Preferences, SmartIcon Settings e. Pick an icon in "Available Icons" column and drag
it to the right column f. Click on the newly added icon in the right column g. Click on "Edit Icon" h. Type in a description in the Description field (e.g. Check size
of mail database) g. Click on the "Formula" button h. Add the following command: @Command([ToolsRunMacro];"(Check Size)") i. Click OK, Click on Done j. Save the Icon set, and click OK %END REM
Dim Session As New NotesSession, db As NotesDatabase, doc As NotesDocument Dim dc As NotesDocumentCollection, server As String, path As String,
title, lastname, firstname As String Set db = session.CurrentDatabase Set dc = db.UnprocessedDocuments For i = 1 To dc.Count Set doc = dc.GetNthDocument(i) server = doc.MailServer(0) path = doc.MailFile(0) lastname = doc.LastName(0) firstname = doc.FirstName(0) Dim userDb As New NotesDatabase( server, path ) Messagebox( "The size of the Mail Database " & firstname & " "
& lastname & " is " & userDb.Size/1048576 & " Megabytes.") Next

Dig Deeper on Lotus Notes Domino Administration Tools



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury