The steps outlined in this document are to be used in conjunction with Microsoft's Knowledge Base articles 181824 regarding corrupted long values and 185271 regarding orphaned long values. These articles can be found on the Microsoft TechNet CD or on the Internet. They discuss the orphaned and corrupted long value conditions in further detail.
For more information, please see the following Microsoft Knowledge Base articles:
181824
XADM: Exchange Database Engine Doesn't Detect Removed Page in B-tree Split Operation
185271 XADM: Orphaned LV Errors When Running ESEUTIL Consistency Checker
185271 XADM: Orphaned LV Errors When Running ESEUTIL Consistency Checker
Long-Values (LVs)
Long-values (LVs) are created when a column is too large to store with the rest of the record. Internally, the Exchange Server database engine breaks large columns into separate parts; these are the long-values. Long-values are stored in a separate binary tree (B-Tree) and each LV is given a table- wide unique identifier (the long-value ID [LID]).Orphaned Long-Values
To save space, the Exchange Server database engine provides the ability for multiple records to share the same LV (similar to, but not exactly related to the information store concept of single-instance storage for messages). To do this, a reference count is attached to each LV. When the reference count reaches zero, the LV is deleted. If the Exchange Server database engine is shut down (by a crash, power cut, or blue screen error messages) after dereferencing an LV, but before expunging it from the database, the LV will be "orphaned," that is, its reference count is set to zero, but it is never removed. Orphaned LVs are invisible to anyone using the database because they are logically deleted, but still take up space because they have not been physically removed.Corrupted Long-Values
As mentioned above, LVs are stored as chunks of data in the long- value tree of a table. Each LV is prefixed by a header ("LVROOT") that contains the length and reference count of the LV. In rare cases (such as the B-Tree split problem documented in article 181824), the LVROOT of an LV can be overwritten. This corrupts the LV, but doesn't actually lose any data. An Exchange Server information store (Store.exe) may stop responding or error out trying to access this LV.NOTE: Starting with Exchange Server Service Pack 1, Eseutil /p is able to examine the database to determine the correct length and refcount of the LV and re-create its LVROOT.
Detecting Long-Values
Exchange Server 5.5 Service Pack 1 contains updated code that prevents and repairs Exchange Server 5.5 LV database anomalies. However, if your Exchange Server 5.5 database already contains orphaned or corrupted LVs, applying Exchange Server Service Pack 1 alone will not fix them.To remove orphaned (product of Store.exe crashes) or corrupted (the product of a defective B-Tree split) LVs in Exchange Server 5.5 databases, you must detect specific LV anomalies by running the Exchange Server integrity checker utility, eseutil /g (with the /v and /x parameters for detailed output). This is considered the most reliable way to verify whether or not the Exchange Server databases contain specific anomalies.
Using this utility is a safe approach to testing database integrity because the Eseutil /g utility operates in a read-only mode. It is very important to detect the specific type of long value anomalies present in the Exchange Server databases in order to ensure the proper steps are taken to fix the databases.
To check Exchange Server 5.5 for LV anomalies documented in the Microsoft Knowledge Base articles above:
- Make and verify a full online backup of your Exchange Server databases.
- Stop all the Microsoft Exchange Server services gracefully using the Control Panel Services tool.
- Use the Eseutil /mh utility, used to dump the Exchange Server database
header information, to verify the consistency of your databases by
running the following from an MS-DOS command prompt:
eseutil /mh {path to EDB}\{db}.edb >dbdmp.txtFor example: eseutil /mh e:\exchsrvr\mdbdata\priv.edb >privdmp.txt
NOTE: Eseutil /mh is a read-only utility and should not cause any damage to the database against which it is run. - Review the corresponding text file, confirm the state is equal to
consistent. This means the Exchange Server database has committed all
transaction log files and the data contained within the database is
consistent.
NOTE: If your database is inconsistent, follow the proper disaster recovery steps as outlined in the Exchange Server 5.5 Disaster Recovery white paper located on the Internet at the following URL: - After your databases have been verified as consistent, with the
Exchange Server services stopped, run the eseutil /g integrity checker
against the databases.
eseutil /g /{db} /V /X >dbchk.txtExamples:g:\>eseutil /g /ispriv /v /x >e:\privchk.txtPast experience has seen Eseutil /g performance in the range of running for one and a half hours on a 30-GB private information store database. This was on a Compaq 7000 quad processor with 512 MB of RAM.
g:\>eseutil /g /ispub /v /x >e:\pubchk.txt
g:\>eseutil /g /ds /v /x >e:\dirchk.txt
NOTE: Eseutil /g is a read-only Exchange Server utility and should not cause any damage to the database against which it is run - After Eseutil /g has finished, search the output in the
corresponding text files for the following words. It is helpful to use
the search or find feature included in most text editors.
- Error
- Orphaned
- Corrupted
NOTE: If both types of LVs (orphaned and corrupted) are detected, repair the corrupted LVs first. After the repair of the corrupted long values has been completed successfully, perform an offline defragmentation on the databases that contain the orphaned LVs.
Make a full online Exchange Server backup of the directory and information store databases after you have removed all LVs from your Exchange Server databases.