Exchange Server Share

May 21, 2008

Exchange 2007 Database Portability

Filed under: Exchange,Exchange 2007,PowerShell — Amit Tank @ 2:18 pm

Database Portability is a new feature of Exchange 2007 and it allows us to mount the exchange database on any of the exchange servers in same organization. Yes, database is portable.

In Exchange 2003 or earlier version it was possible in below conditions only.

  • Server Name should be same.
  • In Recovery storage group.
  • Another server in the same administrative group (This required some additional precautions)

In Exchange 2007 only one restriction is there.

  • Database should be moved to server which is in same Exchange Organization.

Note: Public Folder database cannot move. It can be moved by replicating to another server instead of using portability feature.

As per Microsoft, movement is supported when destination Server has equal or higher version of Windows & service pack level of Exchange 2007.

Permission Required: Exchange Server Admin & Local Server Administrator

Procedure to Move Database

In our example, we move the database from "ATS-Exch701\First Storage Group\Mailbox Database" to New store "ATS-Exch701\Third Storage Group\TMBS" on the same server (since I have only one server in test environment but it should be same while moving to different server)

I have below users in Mailbox Database.

image

  • The first step is to verify DB state and it should show Clean Shutdown.

You can run eseutil /mh <Database Path.EDB> to verify it.

eseutil /mh "C:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Mailbox Database.edb"

image

  • Create a new mailbox database in the destination server but don’t mount it.

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

New-MailboxDatabase -StorageGroup "ATS-Exch701\Third Storage Group" -Name "TMBS"

image

You can create via Exchange Management Console or can verify after creation.

image

  • Set the “This database can be over written by restore” attribute.

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

Set-MailboxDatabase "TMBS" – AllowFileRestore:$True

image

You can verify in GUI.

image 

  • Move the database files (.edb files, log files, and Exchange Search catalog) to the destination location.

Edit (06/09/2007) : You can copy & paste all files to new destination location and rename the edb file to new destination name.

Destination location can be checked with below command where we need to move our source database.

Get-MailboxDatabase "TMBS" | FL Name, EDBFilePath

image

  • Mount the Database.

Mount-Database <Database Name>

Mount-Database "TMBS"

image

After this point if you try to open mailboxes then you won’t be able to access it because Mailbox location is still pointing to old database path in Active Directory.

image 

  • Now its time to change the configuration of user account settings to point this new server and database.

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

Get-Mailbox -Database “ATS-Exch701\Mailbox Database" |where {$_.ObjectClass -NotMatch ‘(SystemAttendantMailbox|ExOleDbSystemMailbox)’}| Move-Mailbox -ConfigurationOnly -TargetDatabase “ATS-Exch701\TMBS”

image

You can also verify in Console.

image 

After Active Directory replication users will be able to access their Mailboxes.

  • Outlook 2007 clients should be redirected automatically because of the auto discovery service.
  • For Outlook 2003 clients, user needs to manually change the server of mailbox to new name.
  • Outlook Web Access users will be automatically redirected to the new server.

image

Put your comments guys..

 

Reference:
Database Portability
http://technet.microsoft.com/en-us/library/bb123954(EXCHG.80).aspx

 

About these ads

7 Comments

  1. [...] Exchange 2007 Database Portability [...]

    Pingback by Weekend reading - subject: exchange — May 30, 2008 @ 5:53 pm

  2. bit confused , after you create the 3rd storage group then made tht database can be overwritten….

    after tht how did you moved the old DB to new location?

    Comment by prabhu — June 7, 2008 @ 9:17 pm

  3. Hello Prabhu,

    You need to just copy and paste the database files (.edb files, log files and Exchange Search catalog) to new destination location.

    Comment by Amit Tank — June 8, 2008 @ 4:42 am

  4. So you copy the database files over. But the files are named differently. I’m assuming once you copy the files over, you will have to rename the old database files to match the new TMBS.edb.

    Comment by iamme22 — June 9, 2008 @ 12:40 am

  5. Yep your assumption is correct… I think I need to update a line about it in my post..

    Comment by Amit Tank — June 9, 2008 @ 1:21 pm

  6. What if the database is not in a clean shut down state?

    Comment by derek — December 9, 2008 @ 11:59 pm

  7. A couple of items…

    1. I was always under the assumption that the target database name had to be the same as the source, looks like that is not the case?

    2. As long as the database is in a clean shutdown state do you need to copy the transaction logs?

    Comment by Jim — January 2, 2009 @ 7:29 pm


RSS feed for comments on this post.

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: