Link to home
Start Free TrialLog in
Avatar of timiano
timiano

asked on

Does the Event ID 1221 logged after online defragmentation just detail the freespace in the edb, or collectively with stm as one unit?

Hi,

I currently have a WMI script that enumerates each instance of eventID 1221 that Exchange logs after running the scheduled maintenance online defrag.  There's little documentation to what the defrag is actually processing, be it the edb only, or both files as one contiguous unit (as it should be).  The figures I collate from these events gives me a Mb figure, but I'm trying to correlate this information to see where the freespace is coming from.

If the freespace figure is just from the edb, how then can I find out, without taking the database offline, how much whitespace is contained within the stm?

One day my dreams will come true with Exchange hosted on SQL :-)

Thanks for your time

Timiano
Avatar of OneHump
OneHump

That should include both the edb and stm files.  They are really considered one database as you pointed out.  When running a manual defrag, tmp files are created for both.  The tables that store messages reference both.  Online maintenance is also performed on both.  I agree that SQL will add a lot of flexibilty to what is currently a very limited database engine.

Are you going to be around here for a while?  You could be our resident scripter!  :)

OneHump
Avatar of timiano

ASKER

Hey OneHump,

I've just subscribed as a proper member to this site, after using it for several months as reference, I thought it was about time I paid my respects for some of the great information I've had from it.  I'll be round here for some time :-)

Re my stm whitespace question, the reason I ask is that my historical figures that I've been supplied by one of my colleagues, don't tally (not even close) to what the online defrag event is reporting.  Its not so much a huge problem, just that I'm looking for a reliable way to analyze database freespace without having to take them offline, as I've got 72 of them!!!

Timiano
People have different opinions about defrag.  Online defrag doesnt deal with whitespace, but just organizes it.  In many deployments, servers are scaled in a way that keeps maintenance from running in the time alloted.

Some people take their databases offline and defrag regularly.  That is not only unnecessary, but risky.  The only reason to defrag is if there is a log of data removed by a certain event.  A mass mailbox move or loop cleanup are some examples.  Even then the need is questionable since the whitespace will be used up.

You shouldnt have to take your databases offline to check whitespace.  I think I might have lost you there.  :)

I'll definately be bugging you for scripting help.  It's something I'm just starting to get into after years of sticking my little toe in the bath water.

OneHump
ASKER CERTIFIED SOLUTION
Avatar of timiano
timiano

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I disagree with PSS.  Please read this article in detail and then tell me that the stm file is not touched.  :)

http://support.microsoft.com/default.aspx?scid=kb;en-us;192185

OneHump
Avatar of timiano

ASKER

OneHump,

That article describes eseutil which is a utility that can be used to offline defragment and examine whitespace (amongst a million other things).  That however, has nothing to do with the online automatic defragmentation that runs as part of the maintenance shedule per database.  The online defrag does not touch the stm, although there is a separate thread that reclaims stm whitespace, but not as aggressively as the maintenance schedule.

If you're interested in some of the plans that we are putting together as a strategy to keep database size down, and report on them as efficiently and as quickly as possible, I'm happy to post details here.

Either way eseutil is an offline utility.

Timiano
Sorry, I thought we were talking about offline.  I realize that I said online maintenance touched both.  Was a hunch but at least I was 1/2 right.  That's better than all wrong.  :)

I am interested in your plans by the way.  Please do post.


OneHump