Using Exchange Database Portability in Exchange 2007

This is a great feature of Exchange 2007, that was a real headache in Exchange 2003 if you all remember in "those days" if you want to mount a DB in another server a series of requisites were needed to do so (The worst of all was that the target server needed to have the exact same name has the old one, fact that in production environments were a major problem, and the alternative was mount it in a lab environment). So now with Exchange 2007 just have to put the DB in any server with any name mount it and change the users info trough PS. This sound very simple, doesn't it? but it is.. here's how:

The first step is to guarantee that the DB is in a clean state for that just run eseutil /mh NAME-OF-DATABASE.EDB against it

This should be the result



So the next step should be the creation of a new mbx in the destination server, this mbx shouldn't be mounted in the end, and we must allow it to be overwritten. Another point to consider is that the name of this database should be the same of the original.


New-MailboxDatabase -StorageGroup <Server_Name>\<StorageGroup_Name> -Name <Database Name>

Allow it to be overwritten

Set-MailboxDatabase <Database Name> -AllowFileRestore:$true

(This can also be performed trough the Exchange Management Console)

Ok, so after this we just have to copy the original Database to the path defined for it, if you don't know were is it just check the database properties in the Exchange Management console.


Now we're ready to mount it

Mount-Database <Database Name>

And finally change the user account setting to point to the new server and Database to do so:

Get-Mailbox -Database NAME-OF-SERVER1\DATABASE-NAME |where {$_.ObjectClass -NotMatch '(SystemAttendantMailbox|ExOleDbSystemMailbox)'}| Move-Mailbox -ConfigurationOnly -TargetDatabase NAME-OF-SERVER2\DATABASE-NAME

After Active Directory replication your users will be able to access their Mailboxes, one last thing be aware that Outlook 2007 clients should be redirected automatically because of the auto discovery service, in Outlook 2003 you should manually change the users server.