Using Disk Defragmenter to defragment Exchange 2003 database files

Does anyone know (for sure) if it is OK to defragment an Exchange 2003 database *.EDB & *.STM files using the O/S's Disk Deframenter (DEFRAG.EXE) if:

1) I stop the Exchange Information Store service (or for that matter any other conflicting Exchange service)
2) I am not interested in reclaiming the whitespace in the DB
3) I am not worried about the DB pages being internally "optimized"

I know for sure I've upgraded disk volumes containing Exchange DBs used disk cloning tools when booted outside the O/S.  I have also copied offline DBs from one disk to another while the O/S was up (and the target DB unmounted of course) for example, after running ESEUtil /D /T /P and not instating the new/temporary/defragmented copy of the DB.  I've even been able to mount an instance of a DB that was copy/pasted to the same disk volume and then moved around.

The last two scenarios especially lead me to believe that it is possilbe to use Disk Defragmenter to defragment Exchange 2003 database files.
acisupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

a1aaitCommented:
It should work fine, but do you realize that disk defragmentation and database defragmentation are not the same thing?

What is the goal?
0
btassureCommented:
Go for it. You don't need to offline the stores either. Windows can do it on the fly. As mentioned it will not defrag the database but will make the files a bit more responsive if they are heavily fragmented already. If you aren't worried about whitespace then you are fine. Once it is defragged make sure your Exchange maintenance plans are running to tidy the pages within the db or the improvement gains will only be tiny.
0
btassureCommented:
FYI we have a scheduled defrag job run on our disks every weekend. I know this shortens the life of the disk a bit but it's worth the performance gains.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

brianarileyCommented:
btassure

are you using the windows defrag on the disks?   and the db is up and mounted at the time?
0
btassureCommented:
Yes. If you want it to go a bit quicker you can dismount your store and stop the services but I just have a scheduled job run every week and set a 2 hour timeout on it. If it is still running then the task is cancelled. That way it still gets part of it done. It will gradually work towards complete defragmentation even if it takes a few weeks. You could set yours to run every day for the first few weeks or something...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
acisupportAuthor Commented:
The main object is to have message store files which have FAR less than the 10,000+ chunks they currently are broken up into.  You can imagine the resulting effect on performance.

Not sure I'd take the chance defragging the files without at least dismounting the DB if not stopping the I/S service.  I've been in some pretty nightmarish Exchange DB recovery situations.  My personal paranoia I guess.
0
btassureCommented:
In that case I would look at dismounting the store, copy the databases to 2 separate disks then delete the original. Defrag the disks WITHOUT the db files in them. Then copy it back over from the other disk. A copy operation will defrag on the fly as long as there is enough unfragmented free space for it to use. It will save it trying to move the bytes around in the gaps of free space it has. Clear it out, consolidate the space and replace the files. Then just remount the store and start the services.
0
acisupportAuthor Commented:
That's a lot to accomplish in a weekly or monthly scheduled task.  In addition, I failed to mention that I have a limited time window (6-7 hrs) to accomplish the task(s) in this particular instance.  Furthermore, by the time I do all that copying around of a 33 GB mailbox store, I might as well do it with a full ESEUtil defrag instead.  At least then I might save a little time due the reduction in size of the DB files after removing all white space.

Anyhow, given your other comments (btassure) I think my best option is to stick with my original plan.  here's the batch/script/command file I wrote to accomplish the task:

net stop SMTPSVC /y
net stop SMSMSE /y
net stop SAVFMSESpamStatsManager /y
net stop MSExchangeIS /y

C:\Windows\System32\Defrag.exe D: /v > D:\DefragLog.txt

net start MSExchangeIS /y
net start SMSMSE /y
net start SMTPSVC /y

0
btassureCommented:
Good luck :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.