站長新書 站長開講 首頁 最新文章 站長著作及審校 FreeBSD 筆記 Linux 筆記 Windows 筆記 虛擬化筆記 網管人雜誌 遊山玩水 關於本站
站長新書 VMware vSphere ICM 團購開跑了!!

重組 Exchange 資料庫

前言

當 Exchange 資料庫使用一段時間後 (視使用者人數及 Mailbox 大小而不同),應該重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案。

為何需要重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案?

如何執行重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案

此例環境設定如下

利用 eseutil 指令執行重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案 (請記得先卸載)

 C:\>cd C:\Program Files\Exchsrvr\bin
 C:\Program Files\Exchsrvr\bin>eseutil.exe /d R:\EXCHSRVR\MDBDATA\Managment.edb
 Microsoft(R) Exchange Server Database Utilities
 Version 6.5
 Copyright (C) Microsoft Corporation. All Rights Reserved.
 Initiating DEFRAGMENTATION mode...
             Database: R:\EXCHSRVR\MDBDATA\Managment.edb
       Streaming File: R:\EXCHSRVR\MDBDATA\Managment.STM
       Temp. Database: TEMPDFRG3892.EDB
 Temp. Streaming File: TEMPDFRG3892.STM
                  Defragmentation Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Moving 'TEMPDFRG3892.EDB' to 'R:\EXCHSRVR\MDBDATA\Managment.edb'...
                     File Copy Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Moving 'TEMPDFRG3892.STM' to 'R:\EXCHSRVR\MDBDATA\Managment.stm'...
                     File Copy Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 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 6765.360 seconds.

如果執行重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案失敗

此例環境設定如下

利用 eseutil 指令執行重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案失敗 (請記得先卸載),且出現錯誤訊息 Operation terminated with error -1019 (JET_errPageNotInitialized, Blank database page

 C:\Program Files\Exchsrvr\bin>eseutil.exe /d S:\EXCHSRVR\MDBDATA\priv1.edb
 Microsoft(R) Exchange Server Database Utilities
 Version 6.5
 Copyright (C) Microsoft Corporation. All Rights Reserved.
 Initiating DEFRAGMENTATION mode...
             Database: S:\EXCHSRVR\MDBDATA\priv1.edb
       Streaming File: S:\EXCHSRVR\MDBDATA\priv1.STM
       Temp. Database: TEMPDFRG5528.EDB
 Temp. Streaming File: TEMPDFRG5528.STM
                  Defragmentation Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
 Operation terminated with error -1019 (JET_errPageNotInitialized, Blank database page) after 62.0 seconds.

請先執行 /p 參數 (保留暫存資料庫也就是執行未設定)

 C:\Program Files\Exchsrvr\bin>eseutil.exe /p S:\EXCHSRVR\MDBDATA\priv1.edb
 Microsoft(R) Exchange Server Database Utilities
 Version 6.5
 Copyright (C) Microsoft Corporation. All Rights Reserved.
 Initiating REPAIR mode...
         Database: S:\EXCHSRVR\MDBDATA\priv1.edb
   Streaming File: S:\EXCHSRVR\MDBDATA\priv1.STM
   Temp. Database: TEMPREPAIR3544.EDB
 Checking database integrity.
                     Scanning Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
 Scanning the database catalog.
                     Scanning Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Rebuilding MSysObjects.
                     Scanning Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Rebuilding MSysObjectsShadow from MSysObjects.
                     Scanning Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Checking the database.
                     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 corruption has been repaired) after 8565.31 seconds.

/p 參數完成後再執行 /d 參數即可

 C:\Program Files\Exchsrvr\bin>eseutil.exe /d S:\EXCHSRVR\MDBDATA\priv1.edb
 Microsoft(R) Exchange Server Database Utilities
 Version 6.5
 Copyright (C) Microsoft Corporation. All Rights Reserved.
 Initiating DEFRAGMENTATION mode...
             Database: S:\EXCHSRVR\MDBDATA\priv1.edb
       Streaming File: S:\EXCHSRVR\MDBDATA\priv1.STM
       Temp. Database: TEMPDFRG4252.EDB
 Temp. Streaming File: TEMPDFRG4252.STM
                  Defragmentation Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Moving 'TEMPDFRG4252.EDB' to 'S:\EXCHSRVR\MDBDATA\priv1.edb'...
                     File Copy Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 Moving 'TEMPDFRG4252.STM' to 'S:\EXCHSRVR\MDBDATA\priv1.stm'...
                     File Copy Status (% complete)
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 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 3189.875 seconds.

參考

[Microsoft 技術支援服務-如何重組 Exchange 資料庫]

[Microsoft TechNet-How to Run Eseutil /D (Defragmentation)]

[Microsoft 技術支援服務-How to re-create STM File in Exchange 2000/2003]

[Exchange 2003 還原IS出了問題 - 微軟技術社群討論區]

Go To Oddmuse OrgGo To FreeBSD OrgCreative Commons 2.5 Taiwansitestates.com