Defragmentation of Private store.

Posted on 2006-06-17
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 300 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
Suggested Courses

623 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