Tacobell2000
asked on
Exchange 2003 Offline Defrag of the databases
Hello,
I would like to know the best way to do an offline defrag of exchange server 2003 enterprise edition using a script
I came accross this script and would like some feedback on it. I would like to be able to automate
the defrag. Stopping the Information store, dismounting the databases, performing the offline defrag and creating a log file and once it is finished mounting the databases.Below is the code.
I would like to know the best way to do an offline defrag of exchange server 2003 enterprise edition using a script
I came accross this script and would like some feedback on it. I would like to be able to automate
the defrag. Stopping the Information store, dismounting the databases, performing the offline defrag and creating a log file and once it is finished mounting the databases.Below is the code.
NET STOP MSExchangeIS
CD "C:\Program Files\Exchsrvr\bin"
ESEUTIL /D e:\Exchange Databases\"Default Mailbox Store.edb"
ESEUTIL /D e:\Exchange Databases\"Enhanced Mailbox Store.edb"
ESEUTIL /D e:\Exchange Databases\"Management Mailbox Store.edb"
"do not know how to create the lof file and mounting the database" Please help
Tacobell2000
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why are you doing an offline defrag on Enterprise edition?
Waste of time. Just create another store, move the mailboxes and content to the new store, drop the original. Zero risk, zero downtime.
Remember offline defrag is not something that MUST be done as any part of regular maintenance and it is not risk free.
-M
Waste of time. Just create another store, move the mailboxes and content to the new store, drop the original. Zero risk, zero downtime.
Remember offline defrag is not something that MUST be done as any part of regular maintenance and it is not risk free.
-M
ASKER
mmmm "Waste of time. Just create another store, move the mailboxes and content to the new store, drop the original. Zero risk, zero downtime."
Is there a knowledge base article you can refer me to?
Tacobell2000
Is there a knowledge base article you can refer me to?
Tacobell2000
KB article? Not that I am aware of.
It is a standard Exchange database procedure. Create a new store, move the mailboxes using Move Mailbox. Then drop the store in ESM. If you haven't moved everything it will not let you drop the store.
Once you have dropped the store, if it was the default store then restart the System Attendant service to get the system mailboxes to restart. Then you can delete the original database.
-M
It is a standard Exchange database procedure. Create a new store, move the mailboxes using Move Mailbox. Then drop the store in ESM. If you haven't moved everything it will not let you drop the store.
Once you have dropped the store, if it was the default store then restart the System Attendant service to get the system mailboxes to restart. Then you can delete the original database.
-M
Why to create a new one.
When moving the mailboxes . to another database, you are writing all the old database to the new one,
this also may make the new database fragment
I recommend that you run the offline defragment
I run it several time on several Org that have a Very lard mailboxes, and its working without problem
you can also use the command to make a temp database so incase anything goes wronge(but there should not) you can use the temp database
dont worry and go with Offline Defrag
When moving the mailboxes . to another database, you are writing all the old database to the new one,
this also may make the new database fragment
I recommend that you run the offline defragment
I run it several time on several Org that have a Very lard mailboxes, and its working without problem
you can also use the command to make a temp database so incase anything goes wronge(but there should not) you can use the temp database
dont worry and go with Offline Defrag
I have to strongly disagree with you.
Moving a large mailbox will not cause fragmentation of the database. It is the completely opposite. Don't confuse this with fragmentation of the database files themselves. That will get fragmented but it doesn't matter - there are no performance gains to be made from running a disk fragmentation tool on an Exchange database - that can actually cause damage to the database.
What do you think an offline defrag does? It creates a new database from the old one. It doesn't actually do anything with the original files. That is just the same thing that creating a new mailbox database and moving the mailboxes does, just without the risk.
The fact that it worked without a problem for you in the past does not mean that either a) it was the right thing to do, or b) it will continue to work without issues.
-M
Moving a large mailbox will not cause fragmentation of the database. It is the completely opposite. Don't confuse this with fragmentation of the database files themselves. That will get fragmented but it doesn't matter - there are no performance gains to be made from running a disk fragmentation tool on an Exchange database - that can actually cause damage to the database.
What do you think an offline defrag does? It creates a new database from the old one. It doesn't actually do anything with the original files. That is just the same thing that creating a new mailbox database and moving the mailboxes does, just without the risk.
The fact that it worked without a problem for you in the past does not mean that either a) it was the right thing to do, or b) it will continue to work without issues.
-M
ASKER
ok...........the decision is to create the new store and move the mailboxes. I have tested Housammuhanna's script and it works.
Also many thanks to you Mestha.
Thanks.
Tacobell2000
Also many thanks to you Mestha.
Thanks.
Tacobell2000
Microsoft recommends to preform an offline defrag often. I think Mestha is confused. The offline defrag (eseutil) tools does perform something similar to creating a new database and moving the mailboxes but also preforms other functions as well. Besides, why do it manually when you can create a script to do it for you with the utility.
You can make a log like this
before each database defrage have this
echo "Starting Defraging database named as Default...">>c:\MyLog.txt
ESEUTIL /D e:\Exchange Databases\"Default Mailbox Store.edb"
echo "Defraging the database default has completed" >> c:\Mylog.txt
and so on