{"id":688,"date":"2017-11-24T22:16:26","date_gmt":"2017-11-24T20:16:26","guid":{"rendered":"http:\/\/itsimple.info\/?p=688"},"modified":"2018-10-12T02:03:00","modified_gmt":"2018-10-12T00:03:00","slug":"how-to-recover-exchange-database-failure","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=688","title":{"rendered":"How To Recover Exchange Database Failure"},"content":{"rendered":"<p>Exchange database can be damaged because of improper shutdown, This can happens due to sudden power lost, server lacking of disk space, Operating system malfunction and so on &#8230;.<\/p>\n<p>The tool to recover the database functionality called ESEUTIL and it is on the installation path of the exchange directory under BIN folder. This are some of the switches to run the command with :<\/p>\n<p><strong>ESEUTIL \/D<\/strong> \u2013 defragment the database files<br \/>\n<strong>ESEUTIL \/R<\/strong> \u2013 restore your database<br \/>\n<strong>ESEUTIL \/G<\/strong> \u2013 check database integrity<br \/>\n<strong>ESEUTIL \/K<\/strong> \u2013 verify checksums in the database<br \/>\n<strong>ESEUTIL \/P<\/strong> \u2013 repair corrupt databases<br \/>\n<strong>ESEUTIL \/M\u00a0<\/strong>\u2013 display database files\u2019 headers, logs or checkpoint files<br \/>\n<strong>ESEUTIL \/Y<\/strong> \u2013 copy database files and log files in a more effective way<br \/>\n<strong>ESEUTIL \/C<\/strong> \u2013 perform hard recovery of a database<\/p>\n<p>When you have damaged database refusing to mount, First check its status with :<\/p>\n<pre>eseutil \/mh \"full path to the Database\"<\/pre>\n<p>Look for the line called &#8220;state&#8221; which indicate the shutdown status. If it is in &#8220;Clean Shut down&#8221; the database is in good shape and you probably just out of space on the disk . If it is in &#8220;Dirty shut down&#8221; , You will need to repair the database and to bring it to &#8220;Clean shutdown&#8221; in order to mount it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-689\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-Database-State-Using-Eseutil-MH-Command-300x152.png\" alt=\"\" width=\"635\" height=\"322\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-Database-State-Using-Eseutil-MH-Command-300x152.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-Database-State-Using-Eseutil-MH-Command.png 682w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>There are two forms of recovery:<\/p>\n<ul>\n<li><strong>Soft recovery<\/strong>\u00a0\u00a0\u00a0A transaction log replay process that occurs when a database is re-mounted after an unexpected stop, or when transaction logs are replayed into an offline file copy backup of a database.<\/li>\n<li><strong>Hard recovery<\/strong>\u00a0\u00a0\u00a0A transaction log replay process that occurs after restoring a database from an online backup.<\/li>\n<\/ul>\n<p>To recover the database first check the main exchange log file :<\/p>\n<pre>ESEUTIL \/ML E00.log<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-691\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-log-State-300x239.png\" alt=\"\" width=\"644\" height=\"513\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-log-State-300x239.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Check-Exchange-log-State.png 642w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/p>\n<p>You can also check the log sequence to find problems there :<\/p>\n<pre>ESEUTIL \/ML E00<\/pre>\n<p>The result should let you know the current log status, in case you will have Dirty shutdown scenario :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-692\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-DirtyShutdown-State-300x175.png\" alt=\"\" width=\"691\" height=\"403\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-DirtyShutdown-State-300x175.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-DirtyShutdown-State.png 637w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/p>\n<p>You will need to repair the database, first lets try soft recovery :<\/p>\n<pre>ESEUTIL \/r &lt;log_prefix&gt; \/l &lt;path_to_the_folder_with_log_files&gt; \/d &lt;path_to_the_folder_with_the_database&gt;<\/pre>\n<p>The basic excution is just : ESEUTIL \/r E00<\/p>\n<p>You can try also to repair the bad Logs by Executing (I have found E00tmp.log in the logs folder, I have replaced it with bad Eoo.log and then the following or you can take the last log and re-name it to EXX):<\/p>\n<pre>ESEUTIL \/r &lt;log_prefix&gt; \/l &lt;path_to_the_folder_with_log_files&gt; \/i<\/pre>\n<p>And Then<\/p>\n<pre>ESEUTIL \/r &lt;log_prefix&gt; \/l &lt;path_to_the_folder_with_log_files&gt; \/a<\/pre>\n<p>Once it is finished , check the database status again :<\/p>\n<pre>eseutil \/mh \"full path to the Database\"<\/pre>\n<p>If it is in clean shutdown , mount the database :<\/p>\n<pre>Mount-MailboxDatabase \u2013identity &lt;database_name&gt;<\/pre>\n<p>If it is still in &#8220;Dirty shutdown&#8221; You will need to run Hard recovery<\/p>\n<pre>ESEUTL \/P &lt;path_to_the_database&gt;\r\n\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-697\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-eseutil-P-warning-300x49.jpg\" alt=\"\" width=\"643\" height=\"105\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-eseutil-P-warning-300x49.jpg 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-eseutil-P-warning.jpg 601w\" sizes=\"auto, (max-width: 643px) 100vw, 643px\" \/>\r\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-695\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-Eseutil-P-Command-300x170.png\" alt=\"\" width=\"649\" height=\"368\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-Eseutil-P-Command-300x170.png 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2017\/11\/Exchange-Eseutil-P-Command.png 643w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/pre>\n<p>If the database is badly corrupted this will repair it but will cause some data lost , You should run isinteg tool as well to narrow the damage:<\/p>\n<p>The path to this tool is as follows:<\/p>\n<pre>C:\\Program Files\\Microsoft\\Exchange Server\\Bin<\/pre>\n<p>In order to repair the database, you need to execute the following command:<\/p>\n<pre>Isinteg \u2013s &lt;server_name&gt; -fix \u2013test alltests<\/pre>\n<p>This command can be repeated as many times as it is necessary to get rid of all errors. Once the repair has been finished, you are ready to mount the database.<\/p>\n<p>&nbsp;<\/p>\n<p>*. if you are in a hurry you can also move all the log files to tmp directory and restart the information store service, this will cause the exchange to reset the log files and sometime this will help to fast mount the database, depending on its damaged level.<\/p>\n<p>*. Some time you need to move the CHK file and the E00 log file in order to run the soft recovery successfully .<\/p>\n<p>*. Once the database is in &#8220;Clean shutdown&#8221;\u00a0 you should run : <b>eseutil \/d &#8220;path to db&#8221;<\/b> to <strong>defrag<\/strong> it, This will ensure the health state of the Database (can take some time).<\/p>\n<p>more inforamtion on this tools :<\/p>\n<p><a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/aa996953(v=exchg.65).aspx\">https:\/\/technet.microsoft.com\/en-us\/library\/aa996953(v=exchg.65).aspx<\/a><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h4>Good Luck<\/h4>\n","protected":false},"excerpt":{"rendered":"<p>Exchange database can be damaged because of improper shutdown, This can happens due to sudden power lost, server lacking of disk space, Operating system malfunction and so on &#8230;. The tool to recover the database functionality called ESEUTIL and it is on the installation path of the exchange directory under BIN folder. This are some [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,9,12,14],"tags":[],"class_list":["post-688","post","type-post","status-publish","format-standard","hentry","category-microsoft-exchange-2010","category-microsoft-exchange-2013","category-microsoft-exchange-2016","category-tutorials","category-windows"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=688"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/688\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}