前言
當 Exchange 資料庫使用一段時間後 (視使用者人數及 Mailbox 大小而不同),應該重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案。為何需要重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案?
- 有助於增加存取和擷取 Exchange 資料庫 (.edb) 及資料流 (.stm) 的速度
- 有助於釋放已刪除的使用者信箱空間 (MailBox)
- 縮小 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案大小
安裝及設定
如何執行重組 Exchange 資料庫 (.edb) 及資料流 (.stm) 檔案
此例實作環境設定如下:- Managment.edb 路徑: R:\EXCHSRVR\MDBDATA\Managment.edb
- Managment.edb 檔案大小: 7.06 GB (重組前)
- Managment.edb 重組花費時間: 6765.360 seconds
- Managment.edb 檔案大小: 3.67 GB (重組後)
利用 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) 檔案失敗
此例環境設定如下:- priv1.edb 路徑: S:\EXCHSRVR\MDBDATA\priv1.edb
- priv1.edb 檔案大小: 19.7 GB (重組前)
- priv1.edb /p 花費時間: 8565.31 seconds
- priv1.edb /d 花費時間: 3189.875 seconds
- priv1.edb 檔案大小: 15.5 GB (重組後)
利用 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.