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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
In this video we show how to create a Contact 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 Recipients >> Contact ta…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

828 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