Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Defragmentation of Private store.

Posted on 2006-06-17
Medium Priority
Last Modified: 2010-03-06
I did an offline defragmentation of the private database this morning and the defrag process went fine and created the tempdfrg.edb and .stm files. The process failed when copying the files back to MDBdata folder. I then tried manually copying the files I got some error. I then renamed the current MDBData folder, created a new MDB data folder and copied the tempdfrg.edb and .stm files to the new MDBData folder.

I them mounted the stores and the server came backup good...
Could someone please confirm that this is what I need to do. Please let me know if I am missied anything (copy any other files or any specific permissions on the new MDBdata folder etc..) Thanks a lot.

Question by:arsmed840
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 27

Accepted Solution

Exchange_Admin earned 900 total points
ID: 16928250
You stated:
"created a new MDB data folder and copied the tempdfrg.edb and .stm files to the new MDBData folder. "
As long as you renamed the files to the proper name then you should be ok.

Author Comment

ID: 16928322
Oops..sorry for not being clear..I moved the tempdfrg.edb and .stm files, renamed them as priv1.ebd and priv.stm (same as before).
Thanks for the reply.
LVL 18

Assisted Solution

amaheshwari earned 600 total points
ID: 16928950
By default, Eseutil /d defragments a database by creating a new database, copying the old database records to the new one, and discarding any unused database pages. This results in a newly organized compact database file.

You may want to use the following option when you use Eseutil to defragment your Exchange databases: • You can run Eseutil with the /d /p option at the command line to configure Eseutil to create the new defragmented database in a separate location, such as a location on a different hard disk. If you turn off instating, the offline defragmentation process preserves the original database uncompacted, and the temporary file that is created is the defragmented version of the database. For example, you could turn off instating by using the /d /p option. Unlike the standard offline defragmentation process (Eseutil /d), if you run Eseutil with the /d /p option, the original database is not overwritten with the new defragmented database when the offline defragmentation process is complete.
The /d /p option can also significantly reduce the time it takes to defragment large databases because you do not copy the defragmented database from the temporary location and overwrite the original fragmented file. However, if you want to mount the defragmented database after you use this option, you must manually move the defragmented .edb and .stm files into the database path and rename them to the correct database file names. For example, if Tempdfg.edb and Tempdfg.stm are the defragmented files that you created by running the /d /p option, you must rename them to Priv1.edb and Priv1.stm respectively if Priv1.edb and Priv1.stm are the databases that you originally ran Eseutil against. The following example command would defragment a database that is named Mailbox Store.edb and its accompanying streaming file, turn off instating, and create the defragmented databases on the D drive. (Note that there is no space after /t.)
eseutil /d /p "c:\program files\exchsrvr\mdbdata\mailbox store.edb" /t"d:\tempdfg.edb"
Note If you do not use the /t option, the Tempdfgxxxx.edb file and the Tempdfgxxxx.stm file are created in the location that you run Eseutil from. (In the previous file names, xxxx is a random number.)

or check with

How can I defragment Exchange 2000/2003 Server databases?

LVL 27

Expert Comment

ID: 16929965
I agree with the above usage of ESEUTIL /D /P except:
"The /d /p option can also significantly reduce the time it takes to defragment large databases because you do not copy the defragmented database from the temporary location and overwrite the original fragmented file."

This is true but if the defragmented database is not going to be used then why go through the process of defragging anyway unless the admin just wants to see how much space will be gained.

But if you do plan to use the defragged database then you have not saved any time by using the /D /P switches together. You still have to manually copy the databases to the correct place.

I personally in all my years of working with Exchange, have not found a reason to use ESEUTIL /D /P but I am sure that someone may have a valid reason.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In-place Upgrading Dirsync to Azure AD Connect
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

705 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