Folks,
to be honest..the database's defrag is pretty the same as Exchange 5.5 version, but always is useful to remember the commands:
First of all , remember that:
Seeding is required under the following conditions:
- When a new passive copy of a database is created. Seeding can be postponed for a new mailbox database copy, but eventually, each passive database copy must be seeded in order to function as a redundant database copy.
- After a failover occurs in which data is lost as a result of the passive database copy having become diverged and unrecoverable.
- When the system has detected a corrupted log file that cannot be replayed into the passive copy of the database.
- After an offline defragmentation of any copy of the database occurs.
- After the log generation sequence for the database has been reset back to 1.
1- Suspend-MailboxDatabaseCopy MST1DB1\MBXSERVER(passive) -Confirm:$false
2- Then all get the phisical database path
Get-MailboxDatabase "MST1DB1" | fl name,*path*
Name : MST1DB1
EdbFilePath : E:\MST1DB1\MST1DB1.edb
LogFolderPath : E:\MST1DB1logs
TemporaryDataFolderPath :
3- Dismount the database
Dismount-Database mst1db1 -confirm:$false
4- The defrag commnad (eseutil /D) , the /t switch redirects the temporary file to another disk (with enough free space ..of course)
eseutil /d E:\MST1DB1\MST1DB1.edb /t e:\def\temp.edb
Extensible Storage Engine Utilities for Microsoft(R) Exchange Server
Version 14.01
Copyright (C) Microsoft Corporation. All Rights Reserved.
Version 14.01
Copyright (C) Microsoft Corporation. All Rights Reserved.
Initiating DEFRAGMENTATION mode...
Database: E:\MST1DB1\MST1DB1.edb
Database: E:\MST1DB1\MST1DB1.edb
Defragmentation Status (% complete)
0 10 20 30 40 50 60 70 80 90 100
|----|----|----|----|----|----|----|----|----|----|
...................................................
|----|----|----|----|----|----|----|----|----|----|
...................................................
Moving 'e:\def\temp.edb' to 'E:\MST1DB1\MST1DB1.edb'... DONE!
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.
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 9.656 seconds.
5- Finally mount the database
Mount-Database mst1db1
6- Update the databases copy
Update-MailboxDatabaseCopy MST1DB1\MAILBOX SERVER(passive) -DeleteExistingFiles6- Update the databases copy
7- Check the database and copy status and check the database file's size in active server and in all passive servers
Get-MailboxDatabaseCopyStatus -Server MAILBOX SERVER(passive)
ESEUTIL is an Exchange database utility located in the \bin directory of Exchange server. A number of switches are possible with ESEUTIL:
- ESEUTIL /D – Used for offline defragmentation of a Database
- ESEUTIL /R – Used for recovery purposes of a Database
- ESEUTIL /g – Performs an integrity check of a Database
- ESEUTIL /k – Performs a checksum test of a Database
- ESEUTIL /p – Repairs a Database when it’s corrupt (and beyond recovery)
- ESEUTIL /m – can dump header information of a Database and Log Files
- ESEUTIL /y – can copy large files like Mailbox Database files efficiently
- ESEUTIL /c – Is used to ‘hard recover’ a database during an online backup