Exchange – Slow Mailbox Migration?

KB ID 0001327 

Problem

I had a problem recently during an Exchange 2007 to 2013 migration, (client can’t support 2016 yet!) Where the mailbox migrations were taking ages. 

Solution

1. Disable Microsoft Replication Service Throttling

On the ‘Target’ server > Open ‘regedit’ > Navigate to;

[box]HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchange ResourceHealth[/box]

Locate the MRS REG_DWORD Value and change it to 0 (Zero)

Note: This wont take effect until the service is restarted, but don’t do that yet.

2. Change Microsoft Replication Service Defaults

Edit the MsExchangeMailboxReplication.exe.config file, you will find  it at the following location;

[box]{Drive-Letter}:\ProgramFiles\Microsoft\Exchange Server\V15\Bin[/box]

Note: Run Notepad as administrator, or it might not let you save the changes!

Change the following settings;

MaxActiveMovesPerSourceMDB=”50″
MaxActiveMovesPerTargetMDB=”50″

 

ExportBufferSizeKB=”10240″

Below the line (above,) add the following (only if target is Exchange 2013 SP1 (Thats CU4!) and above);

ExportBufferSizeOverrideKB=”7500″

Change the following to 20 minutes;

DataImportTimeout=”00:20:00 />

Save and close the file.

Note: This wont take effect until the service is restarted, but don’t do that yet.

3. Disable Indexing on the ‘Target’ Database

Execute the following command;

[box]Set-MailboxDatabase “Target-Database-Name” -IndexEnabled:$False[/box]

4. Restart the Mailbox Replication Service


Can I Restart the Mailbox Replication Service While Migrating Mailboxes?

For safety reasons I would say no, but yes you can actually restart the service during a migration, the individual moves then get flagged as;

StalledDueToMailboxLock

I simply left it for a while, and they all reverted back to ‘Copying Messages’.

DON’T FORGET

When you have finished remember to re-enable indexing and throttling on the target datastore.

Related Articles, References, Credits, or External Links

NA

Exchange – Slow Shutdown and Reboot on a Domain Controller

 

KB ID 0000565 

Problem

To be fair Microsoft recommend that you DO NOT install Exchange on a domain controller. Not only does it cause quite a performance hit on the server, but because of the way services are stopped on the server at shutdown time, the Exchange services take AGES to stop (In fact they end up timing out).

Quite how this explains SBS (Which is a domain controller with Exchange on it) I’m not really sure, perhaps because it’s limited to 75 users Microsoft think that’s OK? But you will still come across Exchange on Domain controllers. I’ve even seen people promote Exchange servers to be domain controllers to fix replication problems. Also If you are in a test environment having one server is more sensible than two (All my test Exchange boxes are domain controllers to save space).

Solution

You can of course manually stop all the Exchange services every time you want to reboot or shutdown. That’s fine in principle but every time you forget you will have annoyed users asking how long it’s going to be down for.

To save that happening I’ve got a script that puts a shutdown shortcut on your desktop (or in the Quick Launch bar if your running on Windows Server 2003). There’s a different one for each version of Exchange, 2010, 2007, and 2003.

Exchange 2010 Slow Shutdown and Reboot on Domain controller.

1. Download this zip file > Extract it > Run the Install.bat file.

2. Then use the shortcut, that’s created to shutdown or reboot the server.

Exchange 2007 Slow Shutdown and Reboot on Domain controller.

1. Download this zip file > Extract it > Run the Install.bat file.

2. Then use the shortcut, that’s created to shutdown or reboot the server.

Exchange 2003 Slow Shutdown and Reboot on Domain controller.

1. Download this zip file > Extract it > Run the Install.bat file.

2. Then use the shortcut, that’s created to shutdown or reboot the server.

Related Articles, References, Credits, or External Links

NA