Wednesday, July 23, 2008

Exchange2007: Move a mailbox database from one server to another

www.1ask2.com
Two Servers: TLC25 and TLCSV167

I will move Telus Storage Group\Telus Database from TLCSV167 to TLC25\First Storage Group\Telus Database.

Clean Shutdown the TLCSV167\Telus Storage Group\Telus Database;

Dismount-Database -Identity 'TLC25\First storage group\Telus database'

New-MailboxDatabase -StorageGroup 'TLC25\First Storage Group' -Name 'Telus Database'

(don't use the Exchange Management console to create the new database)

Set-MailboxDatabase 'TLC25\First Storage Group\Telus Database' -AllowFileRestore:$true



Copy everything under TLCSV167\Telus Storage Group to TLC25\First Storage Group

Mount-Database -Identity 'TLC25\First storage group\Telus database'

Get-Mailbox -Database 'TLCSV167\Telus Storage Group\Telus Database' (pipe) Where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox (pipe) exOleDbSystemMailbox)'} (pipe)Move-Mailbox -ConfigurationOnly -TargetDatabase 'TLC25\First Storage Group\Telus database'

All outlook 2007 clients and OWA clients will automatically connect the new server: TLC25.

Outlook 2003 clients must be re-configured.

=======

Clean Shutdown State?

It is related to transaction log files. Data is first written to transaction log files, and later committed to database. The *.chk file records the point between committed and uncommitted. Clean Shutdown a database will commit all uncommitted log records. So the database is detached from the log file stream. You can mount the database again without performing any recovery operation.