Recently I have been all about teaching my customers how to be prepared for disaster situations. One area that is new in Exchange 2007 is the queue database file on the HUB servers and steps needed to recover this file. What I did is put together a lab to walk through the process of copying the queue database file from one HUB server to another HUB server so that you can become familiar with the steps before you need them (or when you need them I suppose also).

Environment Setup:

CCR Cluster: Node1, Node2, CMS Name = MB1, ClusterName = CCRCluster

Two HUB & CAS servers = HC1 and HC2

Two mailboxes = avoss, tnewman

I used virtual PC as my host for my VMs in my lab so in the steps below you will see instructions on turning off the network adaptor. No matter if you’re using a different Virtual Machine Host or physical servers all you want to do is prevent network communications during these steps.

1. Logon to Node1 and open Failover Cluster Manager

2. Expand CCRCluster > Services and Applications > Highlight MB1 > Take this service or application offline > Take MB1 Offline

3. Open cmd from HC1 and type

a. Telent 192.168.1.32 25

b. Helo cbfive.com

c. Mail from: joesmithjr@cbfive.com

d. Rcpt to: tnewman@exch2007.lab

e. Data

f. Subject: This is not a test message

g. Hello World!!!!!.

h. .

4. On HC2 switch the network card to Not Connected

5. Bring MB1 back online

6. Send a test message from avoss’s mailbox to tnewman’s mailbox

7. Notice the message was not received in tnewman’s mailbox

8. On HC2 run Net Stop MSExchangeTransport

9. In EMS navigate to the database file C:Program FilesMicrosoftExchange ServerTransportRolesdataQueue

10. On HC2 run Eseutil /d mail.que

11. On HC2 run Eseutil /mh mail.que make sure the database is in a clean shutdown state

12. On HC1 in EMS run Net Stop MSExchangeTransport

13. Copy the que database file from HC2 to HC1 and name the current mail.que database on HC1 to mail.que.old and create a new folder called OLD and copy the current files on HC1 to this folder

14. Open Queue Viewer against HC1

15. In EMS type get-transportserver -id hc1 | fl

16. Take note of the default value for –MessageExpirationTimeout

17. In EMS type get-transportserver -id hc1 | Set-TransportServer -MessageExpirationTimeout 8.00:00:00

Note: this is an important step in a production environment especially if you are recovery an old database. If you do not run this step and recover the database, all messages recovered older then the messageexpirationtimeout will be NDR’d

18. On HC1 in EMS type Net Start MSExchangeTransport

19. In Queue View notice the email message from  joesmithjr@cbfive.com

20. Logon to tnewman’s and you should see the message from joesmithjr

21. On HC1 set MessageExpirationTimeout  back to the default setting

22. Enable the nic of HC2

23. On HC2 in EMS type Net Start MSExchangeTransport

24. Check the Queue Viewer for HC2

25. Is the message from chcrand in the queue?

Note: Notice that the message was not sent again. This is because of the message from joesmithjr has a unique ID and will not get delivered again.