Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Some people have the situation where they have set up MSMQ using defaults and now find that the storage disk, usually the system drive C:, has insufficient space for the message volume they are seeing. If there are a number of these machines, or maybe they are in remote locations, a scripted solution for moving the storage location to a large data drive would be desirable.
Unfortunately, it is not possible to automate this change. Right at the bottom of this TechNet article, Message storage, there is a warning:
(or, if you have Windows 2008, it's under "Features" instead of "Service and Applications".)
Changing the storage locations performs several operations:
Because of the range of problems that could arise to block any of these steps, it was decided to ensure that an administrator was interactively performing the operation. A scripted approach could result in a broken storage migration without anybody realising until problems with MSMQ messaging were reported.
So there is no API call you can make to cause MSMQ to change the storage location.
Also, editing the registry locations that MSMQ uses to locate its storage and then moving the files to the new location may result in a broken installation. I have included these below for reference purposes only - modifying them yourself is not supported by Microsoft.
Registry value | Description |
StoreInSeqLogPath (MSMQ 2.0) | Location of exactly-once-delivery checkpoint files. |
StoreJournalPath | Location of journal message files. Journal messages are copies of incoming or outgoing messages that a server processes. |
StoreLogPath | Location of the log files associated with persistent message files. |
StoreMqLogPath (MSMQ 2.0) | Location of the transaction log file, also known as the QM log. Message Queuing stores the current state of active transactions and incoming transacted messages in the transaction log file. |
StorePersistentPath | Location of persistent message files. |
StoreReliablePath | Location of express message files. |
StoreXactLogPath | Location of transaction checkpoint files. |
The values are located under the HKLM\SOFTWARE\Microsoft\MSMQ\Parameters branch.
Note - It is not supported to change the locations for a clustered MSMQ resource and no UI is available to allow you to do this. If you manually edit the registry values under HKLM\SOFTWARE\Microsoft\MSMQ\Clustered QMs\MSMQ$My Resource\Parameters then the changes will be returned to the defaults on service startup.
Anonymous
February 09, 2009
Yesterday I discussed changing the storage location for MSMQ. While testing out the user interface with
Anonymous
May 08, 2013
Starting with Windows 8, there is a PowerShell cmdlet that supports this: Set-MsmqQueueManager. There are options to change the MsgStore, LogMsgStore and TransactionLogStore.
You can use get-help Set-MsmqQueueManager -detailed at a PowerShell prompt for more information.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in