Repair corrupted MS Access database. To repair the corruption you need to launch the tool from within MS Access. This tool detects the Access database files presented for searching and repair the corruption in the files. You can follow this blog to repair the corrupted.mbd &.ldb database step by step. Alter database pms set singleuser with rollback immediate go dbcc checkdb ( pms, repairallowdataloss ) with allerrormsgs go alter database pms set multiuser with rollback immediate.
Eseutil Exchange 2010 Commands
Beware! Eseutil is a dangerous tool in the wrong hands. Consequently I recommend that you practice on a test Exchange Server, or else begin with an innocuous switch such as eseutil /mh.
Having alerted you to the dangers, I want to emphasise that there will be circumstances where eseutil is a life-saver. (Or at least an email saver!)
Topics for Exchange 2010 Eseutil Commands
♠
Eseutil Switches for Exchange 2010 Server
By highlighting the capitalization of this tool – ESEutil, the following facets of this command spring to my mind;
Here is a tool that manipulates the Extensible Storage Engine (ESE).
ESEutil is a similar to NTDSutil, which I use to configure Active Directory.
The capitization reminds me of the ‘util’ part of the word, and this produces a vision of a Suisse army knife (see picture right).
Whether you spell it ESEutil, Eseutil or plain eseutil, this built-in executable is three tools in one. A different switch controls each aspect of eseutil, furthermore, eseutil’s switches are also case insensitive.
Simple Eseutil Commands to Replay Natural Actions The first, and harmless aspect of eseutil, is illustrated by using the /k, and /mh switches. These commands give us the ability to replay actions that occur naturally on an Exchange 2010 server, for example, if you need to replay the logs after a backup, or you need to remount a store.
Classic Database Defrag The second side of eseutil is to defragment Exchange 2010’s databases, for this job use the eseutil /d switch. This purpose of the /d switch is to shrink the .edb files and thus reclaim disk space. However, eseutil /d carries out a specialist database compaction, which is not the same as a Windows Server 2008 disk defragmenter.
Troubleshooting – Death or Glory The third, and the most risky facet of using eseutil, is the repair function, which you execute with the /r or /p switch. I must emphasise that if you need to repair a damaged Exchange mailstore, then eseutil /r or /p should be your last resort. If the database repair fails then it can corrupt the messages in your store, therefore, always backup your Exchange 2010 server before you try the /r or /p switches.
Getting Started with Eseutil If you are new to Eseutil, go to the command prompt and then navigate to the Program FilesMicrosoftExchange ServerBin folder. (See screenshot) Since this bin folder is not in the file ‘Path’, beware of the infamous: ‘not recognised as an internal or external command’ error message. This does not necessarily mean there is no eseutil on the Exchange server, merely that you are not executing the eseutil command from the Exchange ServerBin folder. Research by using eseutil /?
An old trick is to copy the Address as seen in Explorer and then go to the command prompt, right-click and paste that path. (See diagram opposite.)
Alternatively, if you are going do a lot of command line troubleshooting, then it’s worth appending the Path in the System Icon, Environmental Variables.
Scope of Eseutil in Microsoft Exchange 2010 Server A new development in Exchange is that you can use eseutil 2010 not only on Mailbox servers, but also on the Hub Transport and Edge servers.
Guy Recommends: A Free Trial of the Network Performance Monitor (NPM) v11.5
SolarWinds’ Network Performance Monitor will help you discover what’s happening on your network. This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.
What I like best is the way NPM suggests solutions to network problems. Its also has the ability to monitor the health of individual VMware virtual machines. If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.
Eseutil /mh
The eseutil /m mode does not repair any of your Exchange files. Its main purpose is to provide you with information about the state of the database files. In particular to analyse a repair of the Exchange database file using the /p switch. However, I recommend that you start with this command to get a feel of eseutil database management ability.
Here is a simple switch to verify the state of an Exchange database. All that eseutil /mh does is to determine whether the last shutdown was clean or dirty. Eseutil /mh is also ideal to practice getting to the right path and executing eseutil without doing any harm to the mailstore databases.
To start with, familiarise your self with the names and location of the Exchange 2010 databases. My suggestion is to type this command from the Exchange Serverbin folder:
eseutil /mh 'D:Program FilesMicrosoftExchange ServerMailboxFirst Storage GroupMailbox Database.edb' (Assuming Exchange 2010 is installed on the D:.)
Examine the output for this line, ‘State: Clean Shutdown’ (or Dirty Shutdown). In passing, you can also see when the last backup occurred.
Another use of eseutil /mh is in disaster recovery where you want to see if eseutil /p has already been run. If ‘Repair Count’ is greater than zero, then you can see how many times eseutil /p has been tried already. In general, the greater the Repair Count, the less chance of a successful repair.
Eseutil /ml Similar to the /mh, except this switch performs an integrity check on log files, for example, E00.log.
Eseutil /mm Dumps metadata from the database file (not the logs). Specialist use only, I find the output fascinating but not very useful. If you do try this command, best to redirect the output to a file thus:
Eseutil / filename.edb > C:logsExchHead.txt
Eseutil /mk Provides header information about the checkpoint file. Handy for troubleshooting backup / restore problems.
Guy Recommends: The SolarWinds Exchange Monitor
Here is a free tool to monitor your Exchange Server. Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.
This is the real deal – there is no catch. SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.
Eseutil /k – To Check for Damaged Headers
One scenario for Eseutil /k is to check a backup before you restore. The key verb is ‘to check’, while the key noun is ‘header’. Just as checksum verifies a file’s size, so by using eseutil /k you can verify the integrity of Exchange 2010’s information stores. Another job for eseutil /k is to troubleshoot an Exchange 2010 database after an unscheduled shutdown of the Windows 2010 server. One point to note is that eseutil /k does not recover the database, for that you need the /r or /p switch – but be careful.
If you create additional mailbox stores, then check their corresponding .edb filenames. Example: to check the default mailbox store = Mailbox Database.edb go to the command prompt and type: eseutil /k 'c: Program FilesMicrosoftExchange ServerMailboxabc Storage GroupMailbox Database.edb' (I assumed that Exchange 2010 has been installed on the c:).
Do not worry about uninititialized pages, it’s normal to have several hundred in this category. However, what you don’t want is bad checksums or wrong page numbers.
Another scenario is that you wish to check the transaction logs, in which case here is the command:
eseutil /k e00.log
As there are no spaces in the above file or folder names, you do not need to enclose the command with speech marks. However, to save disappointment, pay special attention to the path where the databases are stored.
You can also run checksum against a database on a transport server queue. By default, the database file name is mail.que.
Incidentally the CHKSGFILES Library programmatically verifies the integrity of the Exchange Server 2010 and database and log files.
Eseutil /d – To Defragment the .edb Database
Eseutil /d is probably the commonest, and possibly the safest of eseutil’s switches. Firstly, think of ‘d’ for eseutil database. Secondly, realise that this /d switch works in the same way that Diskkeeper defrags a physical disk. Take the problem where Exchange’s mailstore is huge and does not shrink even after you have deleted several mailboxes. You would like to recover the space occupied by the deleted mailboxes. Thus logon as a local administrator and run: eseutil /d.
To prepare for eseutil /d, make sure that you have plenty of free disk space, at least as much as the database file that you wish eseutil to defrag.
There is no need to stop the Information Store service, just dismount the individual stores in the Exchange Management Console, then right-click the store and select ‘Dismount Database’.
Alternatively, you could try a PowerShell command such as: dismount-Database -identity 'WorcesterFirst Storage GroupYour Database'
Navigate in the cmd window to the Exchange Severerbin folder and issue a command such as this:
Example: eseutil /d e:Exchange ServermdbdataMailbox Database.edb (Or other path to your store)
If you really do not have enough free space try the Eseutil /d /t 'f:temp.edb'. Where the f drive has enough free space.
Take a reading of the store size before and after running eseutil /d. Naturally, remember to remount the store once the defrag has finished.
Defrag Queue Database The defrag procedure for a Hub Transport or Edge Transport server is slightly different. As a preliminary step dismount the Queue database. Navigate to the operating system’s Services snap-in, stop the Microsoft Exchange Transport Service. Now set eseutil /d on to the database. See Eseutil commands in Exchange 2007.
Guy Recommends: SolarWinds’ Log & Event Management Tool
LEM will alert you to problems such as when a key application on a particular server is unavailable. It can also detect when services have stopped, or if there is a network latency problem. Perhaps this log and event management tool’s most interesting ability is to take corrective action, for example by restarting services, or isolating the source of a maleware attack.
Yet perhaps the killer reason why people use LEM is for its compliance capability, with a little help from you, it will ensure that your organization complies with industry standards such as CISP or FERPA. LEM is a really smart application that can make correlations between data in different logs, then use its built-in logic to take corrective action, to restart services, or thwart potential security breaches – give LEM a whirl.
Eseutil /r – To Repair Microsoft Exchange 2010 log files
Hard Recovery In troubleshooting when you force the ESE engine to replay the transaction logs, this is know as a hard recovery; hence Eseutil /r.
Soft Recovery Soft recovery replays the logs – but only those after the last checkpoint. If a the Mailbox database is dismounted or stopped, then the logs pile up. One such soft recovery scenario could be a sudden ‘dirty’ store shutdown, which resulted in transactions being interrupted.
Once that Mailbox store is started again, uncommitted transactions in those logs are written to the database. Also remounting the store triggers a built-in soft recovery routine.
Controlling the Checkpoint File With a soft recovery, Exchange processes a few recent transactions after the last checkpoint. Soft recovery reads pointers in E00.chk, from this information it knows which transactions to commit or roll-back in order to get the database into a consistent state.
When you run a soft recovery, usually you want to move (or delete) the checkpoint file. This is because you will want to be safe and replay all the transaction logs. It is possible to control the checkpoint file during a soft recovery, by adding the /S switch to the recovery command:
Eseutil /r E00 /Sd:checkpoint
Typical Scenario for Eseutil /r Do not run /r just for fun or merely to see what happens, eseutil /r is strictly an emergency measure when all else has failed to get the server working. However if you have restored an Exchange 2010 database but you cannot mount the store then consider Eseutil /r.
Firstly, make the best of a bad situation and backup the Exchange database as it is NOW. Then navigate to the folder containing the transaction logs, now try: eseutil /r e00 /i . Note the sequence /r e00 /i is correct. This assumes that your first, or base log is e00 not some other number. If you have a storage group with multiple stores, I am afraid that you have to dismount all stores before running the /r switch. Perhaps this reminds you that all members of a storage group share the same transaction log.
Kiwi Syslog Server Free Utility to Analyze Your Network Messages
Syslog messages contain useful information for troubleshooting network problems. When something goes wrong then surely there will be an error message in the syslog datagram – if only we can find that record and interpret the event.
Here is a utility to capture and analyze network messages. The Kiwi Syslog Server filters messages and creates advanced alerts. View your syslog data via web access.
Eseutil /p – To Repair a Corrupted Exchange Store Database
Scenario. You need to recover a store.edb database, you tried the last backup, but that was no good. Perhaps the root cause is the corresponding transaction logs are missing. You may see the error message: ‘The database files in this storage are inconsistent’. Next step, gather more information try eseutil /mh. You determine that the state is inconsistent, after backing up the current database, try eseutil /p.
Follow up you repair of the database with Eseutil /d. This not only defrags but also rebuilds indexes. Finally switch to the Isinteg.exe utility and try: isinteg -fix. This Information Store Integrity Checker can repair the database at the application level.
Another spiteful problem is that you cannot backup the store. Perhaps the root case was a hardware malfunction. As a last ditch measure, you could try using eseutil /p. I was going to say backup before you try, but of course, in this instance, backup is the problem! How about a little lateral thinking and try to copy the store before you run eseutil /p.
In Exchange 2010 Eseutil /p can also repair the transport queue database on the Hub server.
Eseutil /a and /cc – To Replay Legacy Logs (Superseded by LLR)
The purpose of the /cc in Exchange 2003 was to force the ESE engine to replay the log files. In Exchange 2010 server, this capability has been superseded by LLR (Lost Log Resilience). The built-in LLR feature which protects Exchange databases from losing the most recent log files. LLR is most important when CCR (Cluster Continuous Replication) is in use.
You can run Eseutil in log recovery mode with the /a switch. Navigate to the folder containing the database where the LLR-protected log file is missing then experiment with this command:
Eseutil /r E00 /a (E00 maybe different on your server)
Here follows the Exchange 2003 server routine
A common scenario for this /cc switch is that you have just restored an Exchange mailstore from last night’s backup and you want to replay today’s logs. Eseutil /cc would achieve your goal provided you issue the command from the folder that contains the Restore.env file. This special file (Restore.env) carries information about the restore in general and the log sequence numbers in particular.
Command: eseutil /cc path to restore.env
Eseutil /cc gets the restored database up-to-date through a hard recovery process. Hard recovery replays the transaction logs after a backup, either select the ‘Last Backup Set’ checkbox, or use eseutil /cc. Remember that eseutil /cc looks for instructions in the Restore.env file. Perhaps you can see what I mean when I say that some aspects of Eseutil are just command line methods of controlling Exchange 2010.
In cases where you are short of disk space, call for the temp switch. Eseutil /cc 'name of temp folder' /t. Naturally you would need to substitute 'name of temp folder' for a real folder.
There is a sister command just to check the contents of restore.env : eseutil /cm path to restore.env
Likely contents of restore.env would include paths to source files. Names of databases .edb and .stm files. See more on restore.env here.
If you delve more deeply, you find that eseutil /c has a whole family of commands e.g. cc /ch.
Eseutil /cm – Read Restore.env
Eseutil Database and Log Errors
Error -501 (0xfffffe0b) JET_errLogFileCorrupt This error indicates physical to a transaction log file. Error -501 is similar to error -1018 in a database file. Unfortunately, there is not much you can o to repair the log file.
Error -515 (0xfffffdfd) JET_errInvalidLogSequence The most likely reason is the log file is missing.
Error -530 (0xfffffdee) JET_errBadLogSignature Another error message I received, but in this case I could not find the root cause. Suspect missing log files.
More Exchange 2010 Troubleshooting Tools
Database Recovery Management This utility executes a set of pre-determined troubleshooting steps to identify Exchange 2010 database problems, for example inconsistency on the log files. Then magically wizards appear to guide you to solutions for the root cause, such as running one of the above Eseutil switches.
Database Troubleshooter This utility is a son of ExTRA (Exchange Troubleshooting Assistant). It calls for built-in routines to identify the reasons why the ESE engine cannot mount the Exchange 2010 database.
To access these tools: Launch the Exchange Management Console Drill down to the Toolbox folder.
Full list of Eseutil Switches for Exchange 2010 Server
Eseutil /? The best way to learn more about these Eseutil switches.
Eseutil /a (New switch for Exchange 2010) LLR replays logs.
(Eseutil /cc Performs a hard recovery after a database restore. Exchange 2003)
Eseutil /d Performs an offline compaction of a database.
Eseutil /g Verifies the integrity of a database.
Eseutil /k Verifies the checksums of a database.
Eseutil /m Generates formatted output of various database file types. e.g. /mh
Eseutil /p Repairs a corrupted or damaged database.
Eseutil /r Performs soft recovery to bring a single database into a consistent or clean shutdown state.
Eseutil /y Copies a database, or log file.
Summary – Microsoft Exchange Server 2010 Eseutil
Eseutil is a powerful command-line utility. It has at least three jobs, defragging stores, checking the .edb database files and repairing corrupted mailbox files or logs. My advice is to practice with the /mh switch before you have to use the eseutil /r (repair) switch on a live network.
If you like this page then please share it with your friends
• Exchange 2010 NDR • Exchange 2010 GAL • Exchange OWA 2010 • Exchange 2010 New Features
Exchange administrators often have to deal with various damages and logical errors in users’ mailboxes. Such logical errors appear in such problems as synchronization errors, Outlook hangs, incorrect representation of the folder items, wrong items number, search and public folders errors, etc.
These errors mostly occur due to failures on the Outlook, in case when client incorrectly updates MAPI flags during mailbox folders elements processing. Most often, this happens with shared mailboxes which is used by several users simultaneously. In most cases, the user may not even be aware of the presence of errors in the connected mailbox or folders, formally everything is working fine. However, with some errors, the user may experience problems while accessing the mailbox or certain folders, viewing or deleting emails or folders, etc.
If the user encounters such problems, the administrator of the Exchange server should to use one of three following ways to restore such a damaged mailbox.
Importing data from Outlook running in cached mode to a .PST file, removing and re-creating a new mailbox for “problem” user and finally importing data from the PST file to the new Exchange mailbox. This method assumes a certain amount of manual manipulation on the user’s computer.
Tip. How to import and export data to PST files in Exchange 2010/2013
Complete unmounting of mailbox store and checking it with Isinteg.exe (Information Store Integrity Checker) utility which allows to fix damages in Exchange base on application level. This method requires quite long mail service down time for all users whose mailboxes are allocated in disconnected database.
Note. In some cases, you can try to move all user`s mailboxes to the “healthy” mailbox database. In this case you can check store integrity without disabling a large number of users. However, this technique is not always applicable for the various reasons.
Restore the Exchange database from backup (How to backup Exchange 2013 mailbox database), import data from a specific mailbox to PST file and further data transfer to re-created mailbox. This method has one disadvantage – all emails which got to user`s mailbox after last backup execution time can be lost.
Exchange server administrators had to use all methods described above up to Exchange 2010 SP1 release, when more convenient functions appeared to restore the logical structure of the damaged mailbox – the new PowerShell cmdlet New-MailboxRepairRequest. This cmdlet allows you to find and fix all logical errors and corruptions in the Exchange database on the application level. You can search and fix all errors for both a certain mailbox and all mailboxes in the database.
In some cases, you don’t have updated backup & New-MailboxRepairRequest command failed to repair corrupt mailbox. In this case you can use Stellar Repair for Exchange Software without losing the important data. Stellar Repair for Exchange is the best alternative of New-MailboxRepairRequest command, it repairs corrupt mailboxes & export it to PST, Live Exchange & Office 365.
In addition, when you use the New-MailboxRepairRequest cmdlet, you do not need to completely take the mail database to offline mode. Only one mailbox for each database is unavailable, the one for which the verification and integrity is currently being performed. Before performing any of described above radical ways to restore of mailbox integrity you should definitely try to use this PoSh command.
You can use this cmdlet to find, repair, and monitor corrupted mailboxes in all supported versions of Exchange 2010, 2013, and 2016.
The syntax of New-MailboxRepairRequest cmdlet is as follows:
Cmdlet allows you to find and fix the following corruption types in Exchange mailboxes:
SearchFolder – errors in search folders;
AggregateCounts – check and correction on the number of items in folders and their sizes;
FolderView – incorrect content represented by folder views;
Using the DetectOnly parameter, you can check one mailbox or mailbox database without performing any actions, for example:
The following example will start the process of woshub user mailbox analysis and recovery for all 4 types of damage.
The following example will start the process of woshub user mailbox analysis and recovery for all 4 types of damage:
The command runs in background mode and its results are not displayed in the PowerShell console. You can trace it by the taskID (RequestID) or / and with the help of Windows event log (event source: MSExchangeIS Mailbox Store; EventID 10059 – repair request start; EventID 10048 successful completion of the repair request).
The following EventIDs can also be useful (for ease of tracking the recovery procedure for Exchange mailboxes, you can combine them into a custom event view with the source MSExchangeIS Mailbox Store)
10044 – The mailbox repair request failed for provisioned folders
10045 – The database repair request failed for provisioned folders
10046 – The provisioned folders repair request completed successfully
10047 – A mailbox-level repair request started
10048 – The repair request successfully completed
10049 – The mailbox or database repair request failed because Exchange encountered a problem with the database or another task is running against the database
10050 – The mailbox repair request task skipped a mailbox
10051 – The database repair request was cancelled because the database was dismounted.
10059 – A database-level repair request started
10062 – Corruption was detected
10064 – A Public Folder repair request started
Tip. Special cmdlet Get-MailboxRepairRequest appeared in Exchange 2013, which allows you to get the status of the mailbox repair task.
One of the features of the New-MailboxRepairRequest cmdlet – after it is started, the mailbox repair process cannot be interrupted without stopping the Exchange Information Store service and unmounting the mailbox database.
If there are several mailbox databases on the server, in order to maintain the performance of the Exchange server, it is not recommended to run New-MailboxRepairRequest at the same time for a large number of databases (although only one MailboxRepairRequest process is supported for one database and up to 100 repair requests per server).
Let`s look at one small case as a practice-oriented example of cmdlet usage.
The Exchange 2016 user encountered the inability to view messages in one of the Outlook folders. Appointed folder was recovered from mailbox backup. However it’s appeared impossible to delete this folder with a help of Outlook / Outlook Web App / MFCMAPI (soft or hard deletion). When you try to delete a folder in Outlook 2016, you receive the following error:
Cannot delete this folder. Right-click the folder, and then click Properties to check your permissions for this folder. See the folder owner or your administrator to change your permissions.
Outlook is synchronizing local changes made to items in this folder. You cannot remove this folder until the synchronization with the server is complete
To check and restore the Exchange mailbox integrity, the following PoSh command was run:
After the successful completion of recovery operation (eventid 10048), the corrupted folder immediately disappeared from Outlook Web App. As for the Outlook, here we had to delete local cache (ost file) for correct mailbox display.
Managing Exchange Mailbox Inbox Rules with PowerShell
August 29, 2019
Fix: Outlook 2016/2013 Always Starts in Offline Mode
July 30, 2019
Configuring Anti-Spam Protection on Exchange 2013, 2016 –...
June 5, 2019
How to Blacklist/Block Sender Domain or an Email...