Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can message queues be recovered from a crashed machine, so that transactional messages can be restored on a new machine?

share|improve this question

1 Answer 1

Stop the MSMQ Service on both source and destination machines:

net stop MSMQ

Delete the following folder on the destination machine and replace with the corresponding folder contents from the source machine:

C:\Windows\System32\msmq

Grant access to copied folder on the destination MSMQ service:

icacls.exe "C:\Windows\System32\msmq" /grant "NT SERVICE\MSMQ":(F)

Configure MSMQ to ignore checkpoint files:

Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters, and then click Parameters. On the Edit menu, point to New, and then click DWORD (32-bit) Value. In the Name field, enter "LogDataCreated," and then ensure that the value is set to 0.

Open the queue properties in the following location. Files are text and can be opened with notepad.

C:\Windows\System32\msmq\storage\lqs

Change the ‘Security’ field to match one from a working queue. An example is given below:

Security=0100078... etc

Restart the MSMQ Service on the destination machine:

net start MSMQ

Troubleshooting:

  • Failure to write destination files: Navigate the destination subfolders, so that Explorer will prompt to allow access.
  • Some messages may be duplicated, as the checkpoint files have been deleted.
  • If the list of messages can be viewed but not the message contents themselves, the ‘security’ field must be changed in the queue properties.

References:

Interpreting file names in the Storage directory in Microsoft Message Queue Server and in Microsoft Message Queuing

http://technet.microsoft.com/en-us/library/cc733512.aspx

http://blog.aggregatedintelligence.com/2012/03/msmqsecurity-descriptor-cannot-be-set.html

share|improve this answer
    
Make sure the new machine has the same computername as the original. –  John Breakwell Jun 21 '12 at 20:36
    
@JohnBreakwell Interesting. I'm not sure I did that. Will have to check next time. –  Thomas Bratt Jun 21 '12 at 21:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.