Link to home
Start Free TrialLog in
Avatar of munozm
munozmFlag for United States of America

asked on

Huge STM file and how do I shrink it?

I have an Exchange 2003 SP2 bridge-head server that I use as a relay server for my internal applications, Sun boxes etc. What happened is that one of the Sun boxes had been queueing up messages from a cron job for at least 6 months (I don't have any idea how long) and decided to relay the messages all at once. When it did, the STM file grew from 600MB to 30GB, filled up the disk and crashed the server.

My question is, will an offline defrag (eseutil) shrink the STM file back to what it was?
Avatar of mass2612
mass2612
Flag of Australia image

Hi,
The STM file holds message info that was submitted by non-mapi clients. A defrag should help clean up any empty pages and indexes but only if there are empty ones available. Are you seeing any events in the logs to do with this? What does the event 1221 show as this will show the amount of recoverable space in the database. You will need to let the online defrag complete to get this info.

The sTM file does contain user data so don't delete it or anything (some people have in the past).
Avatar of munozm

ASKER

The online defrag is showing that there is a small amount of free space but does this address the free space in the EDB file or STM file?
Yeah sorry not sure. As a guess I'd say that the event does not report the space available in the STM file. The defrag would defrag both the EDB and STM but would be a bugger to take the DB offline for nothing. You could take a copy of the files and do an offline defrag on a client machine to test to see if the space can be re-claimed. You would need to take the database down long enough to do a flat file copy to a workstation and then restart the database for user access.

You can then run a defrag (you'll need to install the tools and have enough disk space i.e. 110% of the datbase size) and run the defrag as this can take a while and no point having the database down if this won't fix it. If it does then you can schedule an outage for the live defrag. Before trying anything i'd be backing up.

How to Defrag an EDB File on a Non-Exchange Server - article is old but concepts are the same
http://support.microsoft.com/kb/163627

Defragmenting your Exchange Database
http://www.msexchange.org/tutorials/Defragmenting-Exchange-Database.html
ASKER CERTIFIED SOLUTION
Avatar of munozm
munozm
Flag of United States of America image

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
Do you have all 2300 users in the one database? You shold only need to move the users ni the affected database I would think but their the experts ....

With the weekend coming on I would do them in groups of users maybe 100 depending on your hardware and average mailbox size. Once your user load on the mailbox goes down you could increase the number of mailboxes.
Avatar of realitybytes
realitybytes

munozm, i have the same problem, and i was wondering if you could share with me the results of what you did, and provide a little more detail as to how you went about it. specifically, how do i create a new mail store, and move the mailboxes from the old store into the new one? and more importantly, how do i accomplish this without taking exchange offline?
Avatar of munozm

ASKER

realitybytes,

This is your best bet for creating the new stores:
http://support.microsoft.com/kb/821748/en-us

To move the users just select them in AD Users and Computers, right-click, select Exchange Tasks and follow the steps for moving the users...