Database Corruption archives - Exchange Me!

Exchange Me!:

Database corruption

Apr 17 2008   5:07PM GMT

DATABASE CORRUPTION IN EXCHANGE…PRT3



Posted by: John Bostock
Database, DataManagement, Exchange, Information Store, Transaction logs, Exchange databases, Mailboxes, Exchange Tracking Center, Database corruption

 In this section we will look at exporting the damaged page file to a text file. Name the txt file in relation to the page file itself so as below this relates to page 3106. Therefore, you could use the following command to create a file called 3106.TXT.

This must be run from the \Program Files\EXCHSRVR\BIN directory

eseutil /m “d:\program files\exchsrvr\mdbdata\pri

1.edb” /p3106 >3106.txt

After running the command you will see the text file created.
Microsoft(R) Exchange Server(TM) Database Utilities
Version 6.0
Copyright (C) Microsoft Corporation 1991-2000.  All Rights Reserved.
Initiating FILE DUMP mode…     
Database: d:\program files\exchsrvr\mdbdata\priv1.edb
Page: 3106
pgnoThis <0×02360004,  4>:  3106 (0×00000064)
objidFDP <0×02360018,  4>:  11 (0×0000000b)
ulChecksumParity <0×02360000,  4>:  466674925 (0×1bd0e4ed)
dbtimeDirtied <0×02360008,  8>:  216893 (0×0000000000034f3d)
cbFree <0×0236001c,  2>:  4026 (0×0fba)
ibMicFree <0×02360020,  2>:  3265 (0×0cc1)
itagMicFree <0×02360022,  2>:  2 (0×0002)
cbUncommittedFree <0×0236001e,  2>:  0 (0×0000)
pgnoNext <0×02360014,  4>:  0 (0×00000000)
pgnoPrev <0×02360010,  4>:  0 (0×00000000)
fFlags <0×02360024,  4>:  3141 (0×00000c45)
Parent of leaf
Internal page
Root page
FDP page
Multiple Extent Space (ParentFDP: 97, pgnoOE: 340)
Index page (non-unique keys)
TAG   0    cb:   16    ib:    0    offset:  28 -  37    flags: 0×0000
TAG   1    cb:    6    ib: 3259    offset: ce3 - ce8    flags: 0×0000
Operation completed successfully in 1.91 seconds.

Things to Note:
When I generated my report, I picked page number 3106 at random. As you can see at the bottom of the text file, page 3106 is an index page. If you ever have to repair a 1018 error, you’ll usually lose all of the data on the page that you encountered the error on. Of course, that’s assuming that the error occurred on a leaf page. An index page links too many other pages. Therefore, if the page that I selected had actually been damaged, I might have lost the index page and all related leaf pages. This could possibly lead to a complete breakdown of the entire database. Fortunately, Exchange is really good about rebuilding structural components, such as index pages.

When you browse the file you can see the page number and previous page number and the next database pages. Also you should pick out the checksum parity bit number and you can use all this info when attempting to repair the database.

You also need to realize that you can get false 1018 errors. Now and then a faulty disk cache or a faulty hard drive will cause data to be read from a location other than the correct location specified by Exchange. When this happens the database is initially corrupt and you have a serious problem on your hands because the disks actions will soon cause the database to become totally corrupt.

At this stage you probably really need to understand about repairing a corrupt database which Ill talk about more in another post. For now understand how to read the txt file which will help you resolve and repair.

 

Apr 4 2008   7:00AM GMT

DATABASE CORRUPTION IN EXCHANGE…PRT2



Posted by: John Bostock
Database, Exchange, Information Store, Transaction logs, Exchange databases, Exchange Tracking Center, Database corruption

In the first part of this corruption post I spoke of what happens when an Exchange database goes corrupt on you. I also mention it can happen at page level, database level or store level. I mentioned hardware as well which will cause problems.  This post will concentrate on the 1018 error.

The common type as mentioned of database corruption is at the page level. You’ll get heaps of different error messages the can potentially relate to this type of corrupt database. The most common being 1018, now we have all seen the 1018 Jet_errReadVerifyFailure (havent we?) Most of the time this error indicates that the page has the incorrect checksum value or the page number is incorrect. Microsoft Exchange will begin reading the database page by processing the page number; this is so it knows its reading the correct data. If for some reason the number is different from the expected number, then yes you guessed it exchange generates the 1018 error.

Otherwise Microsoft Exchange will calculate a checksum value for the page then verify the calculated value and make sure it matches the stored checksum value. If it does match then the page is assumed to correct and valid otherwise, yes again the 1018 gets generated.

Should I take the 1018 seriously?

The 1018 is often a warning that bad things are on their way. Exchange is trying to tell you that the database has failed once and may go again. Normally they will be non fatal failures; however future failures could be worst and corrupt the store.

So if you haven’t worked it out already the 1018 is associated with an individual page within the database rather than the whole database. The 1018 is normally not fatal and some may take it as of no interest at all because Exchange has been known to generate this error with infrequently used data such as in a deleted items folder or just a plain old blank database.

What do I do with the 1081?

Try and find more about the error before trying to repair, first instinct is to fix but learn more about it first. This way you can try and determine exactly what data was affected and how fatal the failure is, also what’s the likelihood of it happening again.

In the next section we will look further at the 1018 but in the meantime check out some of the links on the 1018 error.

Understanding and analyzing -1018, -1019, and -1022 Exchange database errors

New error correcting code is included in Exchange Server 2003 SP1

Microsoft engineer Mike Lee recorded a great support webcast last year that is also helpful


Apr 2 2008   5:39PM GMT

DATABASE CORRUPTION IN EXCHANGE



Posted by: John Bostock
Database, Exchange, Information Store, Transaction logs, Exchange databases, Database corruption

If you’ve been in this industry for many years as most of us have and worked with the different variants of Exchange Server I’m sure you would have come across a corrupt Information Store at some stage. In the upcoming blogs I’ll show you the most common type of database corruption and we’ll talk about what we can do to fix each type.

Most of the time database corruption refers to ….the data in the store becomes corrupt/invalid or unreadable. If the wrong data is written to the database or written to the wrong location or physically damaged after being written.

Now..How does this happen? If the hard disk has many bad sectors or becomes physically damaged, transaction logs get read incorrectly and the update is incorrect. I’ve also had it happen when power failures cause shutdown. Whatever the reason you most understand there are several places corruption can occur?

The page Level. – This is an individual place inside the database where data is stored. Miss read Tran logs or power failures normally cause this and you’ll find this type common. Most corruption issues will be page level corruption.

The Database Level. – This is where the individual pages are OK but the database file is invalid. Like if the file header is damaged or part unreadable. This problem at the database level often means the jet database cannot interact correctly with the associated EDB file.

The Application Level – This refers to the entire store itself the database is relational which means that the databases depend on each other for info. Example Although Exchange 2000 doesn’t have directory service it depends on the Active Directory.

Also you must consider other possibilities too. If Exchange isn’t working correctly then don’t always presume it’s the store or the database is corrupt. Exchange depends on Active Directory, IIS and Windows and of course the hardware. So if one of these is having issues then Exchange will be too. If your server has a memory related problem, then items stored in memory may be corrupt. Therefore, if Exchange sends the system to send the contents of a particular memory block to the database or to a transaction log, then the database or transaction log would become corrupted as a result of the memory problem.

You can see that the way Exchange databases are layered and all the components that depend on each other leaves heaps of room for issues.