Exchange Server 2003 Database Repair/ESEUTIL Tools

Below are the steps to repair Windows Exchange Server 2003 Database using eseutil tools. Unable to mount database or Database status showing durty shutdown

1)  First Run  eseutil/mh

D:\Program Files\Exchsrvr\bin>eseutil /mh “d:\program files\exchsrvr\mdbdata\pub
1.edb

Result:

” Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode…
         Database: d:\program files\exchsrvr\mdbdata\pub1.edb

        File Type: Database
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,11
 Engine ulVersion: 0x620,11
Created ulVersion: 0x620,9
     DB Signature: Create time:05/20/2005 14:00:37 Rand:4134905 Computer:
         cbDbPage: 4096
           dbtime: 30289033 (0x1ce2c89)
            State: Dirty Shutdown – “Need To Repair”
     Log Required: 355973-355981 (0x56e85-0x56e8d)
   Streaming File: Yes
         Shadowed: Yes
       Last Objid: 2823
     Scrub Dbtime: 0 (0x0)
       Scrub Date: 00/00/1900 00:00:00
     Repair Count: 0
      Repair Date: 00/00/1900 00:00:00
 Old Repair Count: 0
  Last Consistent: (0x55EA6,10,C2)  05/09/2009 03:04:53
      Last Attach: (0x55EA6,11,165)  05/09/2009 11:29:33
      Last Detach: (0x0,0,0)  00/00/1900 00:00:00
             Dbid: 2
    Log Signature: Create time:05/20/2005 14:00:37 Rand:4124268 Computer:
       OS Version: (5.2.3790 SP 2)

Previous Full Backup:
        Log Gen: 355274-355277 (0x56bca-0x56bcd)
           Mark: (0x56BCA,1632,1C9)
           Mark: 05/15/2009 21:00:11

Previous Incremental Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Shadow copy backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

     cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
cpgUpgradeSpaceMapPages: 0

       ECC Fix Success Count: none
   Old ECC Fix Success Count: none
         ECC Fix Error Count: none
     Old ECC Fix Error Count: none
    Bad Checksum Error Count: none
Old bad Checksum Error Count: none

Operation completed successfully in 3.31 seconds.”
PUB1.STM
D:\Program Files\Exchsrvr\bin>eseutil /mh “d:\program files\exchsrvr\mdbdata\pub
1.stm

Result:

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode…
         Database: d:\program files\exchsrvr\mdbdata\pub1.stm

        File Type: Streaming File
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,11
 Engine ulVersion: 0x620,11
Created ulVersion: 0x620,9
     DB Signature: Create time:05/20/2005 14:00:37 Rand:4134905 Computer:
         cbDbPage: 4096
           dbtime: 0 (0x0)
            State: Dirty Shutdown – “Need to Repair
     Log Required: 0-0 (0x0-0x0)
         Shadowed: Yes
       Last Objid: 0
     Scrub Dbtime: 0 (0x0)
       Scrub Date: 00/00/1900 00:00:00
     Repair Count: 0
      Repair Date: 00/00/1900 00:00:00
 Old Repair Count: 0
  Last Consistent: (0x55EA6,10,C2)  00/00/1900 00:00:00
      Last Attach: (0x55EA6,11,165)  00/00/1900 00:00:00
      Last Detach: (0x0,0,0)  00/00/1900 00:00:00
             Dbid: 0
    Log Signature: Create time:05/20/2005 14:00:37 Rand:4124268 Computer:
       OS Version: (5.2.3790 SP 0)

Previous Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Previous Incremental Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Shadow copy backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

     cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
cpgUpgradeSpaceMapPages: 0

Operation completed successfully in 3.31 seconds.”

2)  Then Run  eseutil/p

D:\Program Files\Exchsrvr\bin>eseutil /p “d:\program files\exchsrvr\mdbdata\pub1
.edb

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating REPAIR mode…
        Database: d:\program files\exchsrvr\mdbdata\pub1.edb
  Streaming File: d:\program files\exchsrvr\mdbdata\pub1.STM
  Temp. Database: TEMPREPAIR3544.EDB

Checking database integrity.

The database is not up-to-date. This operation may find that
this database is corrupt because data from the log files has
yet to be placed in the database.

To ensure the database is up-to-date please use the ‘Recovery’ operation.
                     Scanning Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
          ……………………………………………

Scanning the database.

                     Scanning Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
          ……………………………………………

Repairing damaged tables.

                     Scanning Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|

Deleting unicode fixup table.
……………………………………………

Repair completed. Database corruption has been repaired!

Note:
  It is recommended that you immediately perform a full backup
  of this database. If you restore a backup made before the
  repair, the database will be rolled back to the state
  it was in at the time of that backup.

 

Operation completed successfully with 595 (JET_wrnDatabaseRepaired, Database cor
ruption has been repaired) after 183.31 seconds.

pub1.stm
D:\Program Files\Exchsrvr\bin>eseutil /p “d:\program files\exchsrvr\mdbdata\pub1
.stm

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating REPAIR mode…
        Database: d:\program files\exchsrvr\mdbdata\pub1.stm
  Temp. Database: TEMPREPAIR5868.EDB

Checking database integrity.

 
Operation terminated with error -1206 (JET_errDatabaseCorrupted, Non database fi
le or corrupted db) after 3.141 seconds.

 
D:\Program Files\Exchsrvr\bin>eseutil /p “d:\program files\exchsrvr\mdbdata\pub1
.stm

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating REPAIR mode…
        Database: d:\program files\exchsrvr\mdbdata\pub1.stm
  Temp. Database: TEMPREPAIR3504.EDB

Checking database integrity.

 
Operation terminated with error -1206 (JET_errDatabaseCorrupted, Non database fi
le or corrupted db) after 3.0 seconds.

 
D:\Program Files\Exchsrvr\bin>

2)  Then Run  eseutil/d

D:\Program Files\Exchsrvr\bin>eseutil /d “d:\program files\exchsrvr\mdbdata\pub1
.edb

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating DEFRAGMENTATION mode…
            Database: d:\program files\exchsrvr\mdbdata\pub1.edb
      Streaming File: d:\program files\exchsrvr\mdbdata\pub1.STM
      Temp. Database: TEMPDFRG3884.EDB
Temp. Streaming File: TEMPDFRG3884.STM

                  Defragmentation Status (% complete)

          0    10   20   30   40   50   60   70   80   90  100
          |—-|—-|—-|—-|—-|—-|—-|—-|—-|—-|
          ……………………………………………
Moving ‘TEMPDFRG3884.EDB’ to ‘d:\program files\exchsrvr\mdbdata\pub1.edb’… DON
E!

Moving ‘TEMPDFRG3884.STM’ to ‘d:\program files\exchsrvr\mdbdata\pub1.stm’… DON
E!

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.

Operation completed successfully in 136.297 seconds.

4. And Finaly Run eseutil/mh

D:\Program Files\Exchsrvr\bin>eseutil /mh “d:\program files\exchsrvr\mdbdata\pub
1.edb

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode…
         Database: d:\program files\exchsrvr\mdbdata\pub1.edb

        File Type: Database
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,11
 Engine ulVersion: 0x620,11
Created ulVersion: 0x620,11
     DB Signature: Create time:07/14/2009 19:09:42 Rand:79660670 Computer:
         cbDbPage: 4096
           dbtime: 1089607 (0x10a047)
            State: Clean Shutdown – ” Repaird Successfully”
     Log Required: 0-0 (0x0-0x0)
   Streaming File: Yes
         Shadowed: Yes
       Last Objid: 628
     Scrub Dbtime: 0 (0x0)
       Scrub Date: 00/00/1900 00:00:00
     Repair Count: 2
      Repair Date: 07/14/2009 18:57:50
 Old Repair Count: 2
  Last Consistent: (0x0,0,0)  07/14/2009 19:11:54
      Last Attach: (0x0,0,0)  07/14/2009 19:09:43
      Last Detach: (0x0,0,0)  07/14/2009 19:11:54
             Dbid: 2
    Log Signature: Create time:00/00/1900 00:00:00 Rand:0 Computer:
       OS Version: (5.2.3790 SP 2)

Previous Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Previous Incremental Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Shadow copy backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

     cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
cpgUpgradeSpaceMapPages: 0

       ECC Fix Success Count: none
   Old ECC Fix Success Count: none
         ECC Fix Error Count: none
     Old ECC Fix Error Count: none
    Bad Checksum Error Count: none
Old bad Checksum Error Count: none

Operation completed successfully in 3.32 seconds.
D:\Program Files\Exchsrvr\bin>eseutil /mh “d:\program files\exchsrvr\mdbdata\pub
1.stm

Microsoft(R) Exchange Server Database Utilities
Version 6.5
Copyright (C) Microsoft Corporation. All Rights Reserved.

Initiating FILE DUMP mode…
         Database: d:\program files\exchsrvr\mdbdata\pub1.stm

        File Type: Streaming File
   Format ulMagic: 0x89abcdef
   Engine ulMagic: 0x89abcdef
 Format ulVersion: 0x620,11
 Engine ulVersion: 0x620,11
Created ulVersion: 0x620,11
     DB Signature: Create time:07/14/2009 19:09:42 Rand:79660670 Computer:
         cbDbPage: 4096
           dbtime: 0 (0x0)
            State: Clean Shutdown – “Repaired Successfully”
     Log Required: 0-0 (0x0-0x0)
         Shadowed: Yes
       Last Objid: 0
     Scrub Dbtime: 0 (0x0)
       Scrub Date: 00/00/1900 00:00:00
     Repair Count: 0
      Repair Date: 00/00/1900 00:00:00
 Old Repair Count: 0
  Last Consistent: (0x0,0,0)  00/00/1900 00:00:00
      Last Attach: (0x0,0,0)  00/00/1900 00:00:00
      Last Detach: (0x0,0,0)  00/00/1900 00:00:00
             Dbid: 0
    Log Signature: Create time:00/00/1900 00:00:00 Rand:0 Computer:
       OS Version: (5.2.3790 SP 2)

Previous Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Previous Incremental Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Full Backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

Current Shadow copy backup:
        Log Gen: 0-0 (0x0-0x0)
           Mark: (0x0,0,0)
           Mark: 00/00/1900 00:00:00

     cpgUpgrade55Format: 0
    cpgUpgradeFreePages: 0
cpgUpgradeSpaceMapPages: 0

Operation completed successfully in 3.0 seconds.