如何在不同案例中執行 Eseutil /P (修復)

 

上次修改主題的時間: 2006-06-09

本節描述的 Eseutil 語法和行為套用至 Exchange Server 2003 Service Pack 2 (SP2),並提供對資料庫執行 Eseutil 修復的指示。Eseutil 修復模式會在分頁和表格層級更正毀損或受損的資料庫,但不會在應用程式層級上更正。修復可順利完成,使所有資料庫表格一致,但資料庫已嚴重受損而無法裝載。如需 Eseutil 修復模式的相關資訊,請參閱 Eseutil /P 修復模式

開始之前

對資料庫執行 Eseutil 修復模式之前,請考量下列事項:

  • 本機邏輯磁碟機上必須有足夠磁碟空間存放暫存修復資料庫。建議保留所要修復的資料庫檔案大小的 20%,但暫存檔的大小視所做的修復的性質而有很大的差異。如果沒有足夠空間可用,可將暫存檔重新導向不同磁碟機,如下所述。
  • 資料流資料庫 (.stm 檔) 與訊息應用程式發展介面 (MAPI) 資料庫 (.edb 檔) 必須位於相同資料夾中,否則,您必須設定命令列參數來識別資料流資料庫的路徑,如下所述。

程序

執行 Eseutil /P

  • 使用 Eseutil 修復資料庫的基本命令列語法如下:

    ESEUTIL /P database_filename.edb
    
    note附註:
    使用 Exchange Server 5.5 時,您需要執行 /V 才能查看完整記錄,而在 Exchange 2000 Server 與更新的版本中,這是預設設定。

對資料庫執行 Eseutil 修復時,您可能會遇到這些狀況:

  • 資料庫與資料流檔案不相符
  • 遺漏資料流檔案

資料庫與資料流檔案不相符

有些硬體當機會使資料庫與資料流資料庫彼此失去同步,或取得的資料流資料庫與資料庫檔案相較之下是過期的。根據預設,修復一開始會檢查此問題,結束時會讓您有機會取得可用的正確檔案。

您可以強迫修復繼續略過此問題,但如果資料流檔案實際上不屬於資料庫,則無法救回其中的資料。相反地,會從資料流檔案中刪除所有資料。唯有當您十分確定資料流檔案和資料庫檔案都屬於同一個資料庫,且兩者幾乎彼此同步,才強迫忽略不相符情形。

資料流資料庫完全由原始使用者資料組成。關於此資料的所有邏輯結構和擁有權資訊是位於 MAPI 資料庫 (.edb 檔) 中。.stm 檔中所有不符合 .edb 檔中的資料指標的資料,在修復期間都會消失不見。

遵循下列這些步驟來執行 Eseutil /P,以忽略資料流檔案不相符情形:

忽略資料流檔案不相符情形

  • 若要忽略資料流檔案不相符情形,請將 /I 參數新增至 Eseutil 命令列。例如:

    ESEUTIL /P priv1.edb /I
    

遺漏資料流檔案

如果資料流資料庫毀損或遺漏,您仍然可以順利完成修復,但會失去該檔案的所有資料。如果大部分使用者為 MAPI 用戶端 (Microsoft® Office Outlook® 使用者),可以不理會失去的資料。如果大部分使用者是透過 Post Office Protocol version 3 (POP3) 或 Internet Message Access Protocol version 4 (IMAP4) 連線,則失去資料可能造成重大災害。

當資料庫資料流檔案遺漏或目前資料流檔案無法完成修復時,請遵循這個步驟來執行 Eseutil /P:

建立新的資料流檔案

  • 若要建立新的資料流檔案,請使用 /CREATESTM 參數。例如:

    ESEUTIL /P PRIV1.EDB /CREATESTM
    

修復後注意事項

執行 Eseutil /P 修復資料庫之後,請記住下列各項:

  • 在修復之後盡快執行資料庫完整備份。修復會使先前的備份無效。但這不表示先前的備份無法還原或完全無用。這表示修復無法從先前備份完全向前復原資料庫。如果還原先前備份,交易記錄檔重新顯示會在完成修復之處結束。修復之後的任何資料庫變更無法放回到已還原的資料庫中。因此,在修復之後一定要盡快執行資料庫的完整備份。
  • 記住,您必須執行 defrag (Esetuil /D) 和 ISInteg -fix 來完成修復。唯有當您想要使用修復的資料庫先救回再捨棄時,才可以略過這些額外步驟。略過它們表示您可以救回的資料比完成它們時救回的資料更少,但也表示可節省幾小時的復原時間。
important重要事項:
在將修復的資料庫放回實際執行環境之前,您必須先執行資料庫的完整備份、執行 defrag 及執行 ISInteg。Microsoft IT 的最佳作法是儘快移動信箱,而不是讓已修復的資料庫無限期地留在實際執行環境中。如需相關資訊,請參閱 Eseutil /P 修復模式

命令列參照

在命令提示字元下的 Exchsrvr\Bin 資料夾中輸入 Eseutil ./?,然後選取 P 表示修復,如此即可看到這個命令列參照。

REPAIR:
    DESCRIPTION:  Repairs a corrupted or damaged database.
         SYNTAX:  ESEUTIL /p <database name> [options]
     PARAMETERS:  <database name> - filename of database to repair
        OPTIONS:  zero or more of the following switches, separated by a space:
                  /s<file>     - set streaming file name (default: NONE)
                  /t<db>       - set temp. database name
                                 (default: TEMPREPAIR*.EDB)
                  /f<name>     - set prefix to use for name of report files
                                 (default: <database>.integ.raw)
                  /i           - bypass the database and streaming file mismatch error
                  /g           - run integrity check before repairing
                  /createstm   - create empty streaming file if the file is missing
                  /8           - set 8k database page size (default: auto-detected)
                  /o           - suppress logo
          NOTES:  1) Repair does not run database recovery. If a database
                     is in a "Dirty Shutdown" state it is strongly
                     recommended that before proceeding with repair,
                     recovery is first run to properly complete database
                     operations for the previous shutdown.
                  2) The /i option ignores the signature mismatch error in
                     the check phase if the database and streaming file do
                     not match each other. The database and streaming file
                     will receive new signatures in the repair phase. Without
                     using this option, repair will terminate immediately
                     once the database and streaming file mismatch error occur
                  3) The /g option pauses the utility for user input before
                     repair is performed if corruption is detected. This optio
                     overrides /createstm and /o options.
                  4) The /createstm option is irreversible.  Once you
                     start the repair process a new streaming file will
                     be created.  Any streaming file that existed before
                     the repair will no longer work with this database.

相關資訊

如需相關資訊,請參閱《Exchange Server 資料庫公用程式手冊》中的下列主題: