Download EDB Converter Free

Showing posts with label eseutil. Show all posts
Showing posts with label eseutil. Show all posts

Monday, 4 May 2015

// // Leave a Comment

How to defrag exchange 2010 database [Step By Step Guide with Screens]

Why do we need to defrag the exchange mailbox database? Here are some situations in which you have to perform defragmentation on your exchange mailbox database:
  1. No additional space left to create a new database to migrate the mailbox.
  2. Active alerts for the low disk space.
  3. In order to claim whitespace created by archiving process.

Your options to reclaim space (whitespace) created due to deletion of mails and other items from mailbox are to either:
  • Create a new mailbox database and move all the mailboxes to that database: A mailbox migration has fewer risks, can be less disruptive as a whole, but will generate a lot of transaction logging that needs to be kept under control so it may take longer (i.e. several nights/weekends to migrate) as opposed to just one outage for a defrag.
  • Perform an offline defrag (using eseutil /d command): An offline defrag involves an outage for all users on that database, but may be more convenient if there is not additional storage available to allocate to the Exchange server to hold the new database.

Defrag exchange 2010 database using eseutli /d (Step by Step Guide)

Note:
  • You can defragment a database only if it is dismounted which means no user can access the database (emails) until the defrag process is complete.
  • You need some available disk space (1.2 times free space) to perform the defrag. This is because a new file is written during the defragmentation process. 
  • Most important one the backup that you can use for recovery if something goes wrong during the defrag. 

Here the steps that you can follow to perform defragmentation exchange 2010 database:
Step 1: Check the size of mailbox (how big it is?) and how much whitespace is there. To check this you need to run the following command in Exchange Management Shell.
[PS] C:\>Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace –auto
This command will show Name, Size and Available New Mailbox Space (whitespace). The whitespace is created due to             archiving. If you want to reclaim this space go to step 2.
Step 2: Open the Exchange Management Shell and navigate to the folder containing the database file.
cd D:\Data\MB-HO-01
Step 3: Dismount the mailbox database.
Dismount-Database MB-HO-01
Step 4: Run ESEUtil to defrag the file.
[PS] D:\Data\MB-HO-01>eseutil /d MB-HO-01.edb /t\\testserver\defrag\temp.edb
Note:
  It is recommended that you immediately perform a full backup
  of this database. If you restore a backup made before the
  defragmentation, the database will be rolled back to the state
  it was in at the time of that backup.
Step 5: Mount the database again.
mount-Database MB-HO-01
Step 6: check that the file is smaller, and all the white space is gone.
Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

Reasons why not to do offline defrag

Here are the top reasons why you should not perform offline defrag using Eseutil /d unless or until it is very necessary:
  1. Database Dismounted during the defrag process: During the defragmentation process as stated above you need to dismount the database first. Dismounting the database for a long time can cause problem (emails can’t be accessed). After the defragmentation process complete you need to remount the database and take a full backup immediately which is time consuming.
  2. Risk of Database Corruption: There is risk of database corruption during the defrag process.
  3. Complicated and time consuming: offline defrag not only complicates the process of backup and recovery but also a time consuming process. 

So what’s the alternative for offline defrag process?

So what to do in case of getting active alerts for low space on storage (database need to be cleared) otherwise database dismounting problem.
Read the following post for better solution to increase the size of database and other life saving strategies that you can perform in order to save you exchange database from being corruption. 
Read More

Wednesday, 29 April 2015

// // Leave a Comment

How to Repair Exchange Database

Repair Exchange Database with ESEUTIL

Microsoft Exchange Server includes two utilities (Eseutil and Isinteg) that will help you to repair Exchange Server Database. The Exchange Server Database Utilities (Eseutil.exe) is can be used to verify, modify, and repair an Exchange database file.
Here is the step by step procedure that you can follow to repair Exchange Server Database with ESEUTIL utility. Note:
  1. Make a copy of the database files(s) before you repair them.
  2. Verify that you have sufficient disk space to do the repair.
  3. The streaming database (.stm file) must be in the same folder as the MAPI database (.edb file). 

Step 1: Run Eseutil in /P (repair) mode.


Problems Arises while running Eseutil /P command 

Eseutil/P command repairs a corrupt offline database by skipping any pages that cannot be fixed. You may encounter two problem while running Eseutil/P command:
  1. Database and streaming files don't match: Sometimes due to hard crash of the Exchange Server causes Database and Streaming file mismatch or out of sync (streaming file is out of date with database file). This files mismatch can be checked at the beginning and gives users a chance to choose a correct .stm file You can ignore the mismatch by using this command  ESEUTIL /P priv1.edb /I
  2. (.stm) Streaming file is missing: You can repair exchange database even if the streaming file is missing or corrupted but there will data loss. In case MAPI configured clients the data loss will be negligible but for POP3 or IMAP4 protocol configured client recovery the data loss will be so much high. You can create a new streaming file using the following command  ESEUTIL /P PRIV1.EDB /CREATESTM

Step 2: Defragment the Exchange Database

Note: For defragmenting the Exchange Database, you need space equivalent to 110% the size of the database.
Run the following command to defrag the exchange server database
Eseutil in /D (defragment) mode.
Above command defragments the database offline but leaves the new, defragmented database in the temporary location with or without overwriting the original database.

Step 3: Clear Transaction Log

Now, your database is restored. You need to move or take a backup of all the transaction logs for your database.

Step 4: Run Integrity Check

Now run the Isinteg in -fix -test -alltests mode.
isinteg -s ServerName -test -alltests

Step 5: Remount

Finally, remount the store using ESM to complete the process.

Repair Exchange Database Without log files- An Alternative Approach

You can recover or repair exchange database without log files by using ESEutil command with /p mode. Using this command database can be brought to consistent state from inconsistent state. But there is problem of data loss (due to corrupt pages, broken links and other issues) while recovering exchange database file using this approach. So it is recommended to use third party tools like Exchange Recovery software which provide easy interface and simplifies the complicated process of exchange recovery.
  
Read More