How to reduce a huge .stm file?

Posted on 2008-10-02
Last Modified: 2012-06-27
Hi Experts,

I'm running Exchange 2003 Standard.  Priv.edb is about 32GB.  Priv.stm 'was' probably a gig or so, maybe a bit more or less but definately small.  Over the weekend, one of our applications went mad and decided to send millions of emails.  Now my .stm file is 37GB!!  So I'd like to reduce it.

So far I've tried to move the mailbox (which shows as 32GB in ESM) to a backup exchange server.  The move ran for 46 hours before it failed coz the other server ran out of disk space when that priv.edb got to about 46GB (bigger than the 37GB stm file).  One thing I noitced in the 'move mailbox' wizard is that it would count up to approx 64,000 items then go back and start counting from zero again.  I was hoping it was moving 64,000 emails at a time but now I think it may have been trying to move the first 64,000 emails over and over again.
I've also tried to open the mailbox in Outlook but so far that's been hanging for 24 hours.

Does anyone have any ideas of anything else I can try?

oh, I also tried to exmerge the emails out but that stopped (and hung) after half a gig.
Question by:Darylx
LVL 25

Expert Comment

ID: 22622179
Which mailbox is it?  Can you just delete the contents?
LVL 10

Author Comment

ID: 22622211
I was wondering if I could just delete the mailbox and recreate another one.  I thought about deleting the actual contents which is why I've tried to open the mailbox with outlook, but that's just been hanging for 24 hours now.
If I delete the mailbox, would that get rid of the emails (or the bodies of the emails) that are stuck in the stm file?
LVL 42

Assisted Solution

paulsolov earned 100 total points
ID: 22622216
1.  Make sure you're running SP2 of Exchange and your mail store is set to a larger mail store size than default which is 16GB in SP1 and 18GB in SP2.  This is only if you're trying to move it.  

I would delete mailbox and restore from backup the day before if possible, this will get you to a state without the large mailbox and to where you were before this occured
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

LVL 25

Accepted Solution

kieran_b earned 300 total points
ID: 22622251
>>If I delete the mailbox, would that get rid of the emails (or the bodies of the emails) that are stuck in the stm file?

Yes, it would.

However, the database will not shrink until you defrag it or move all the users to a new database and delete it.
LVL 23

Assisted Solution

by:Justin Durrant
Justin Durrant earned 100 total points
ID: 22623360
You could also create a new store and move the users from the old stores into the new ones. This will commit anything in the STM file and also defrag the database.
LVL 10

Author Comment

ID: 22709432
Thanks guys.  I deleted the mailbox and ran an offilne defrag.

The edb file is now down to 25GB from 37GB.
The stm file is now down to 2.5GB from 38GB.
That's reduced it all by 47.5GB, amazing :-)

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data‚Ķ
how to add IIS SMTP to handle application/Scanner relays into office 365.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now