Miklix

Put Dynamics 365 FO Virtual Machine Dev or Test into Maintenance Mode

Published: March 29, 2023 at 6:27:27 PM UTC

In this article, I explain how to put a Dynamics 365 for Operations development machine into maintenance mode by using a couple of simple SQL statements.


I was recently working on a project where I needed to handle some custom financial dimensions. While the correct dimensions did exist in the test environment, in my development sandbox I only had the default Contoso data from Microsoft, so the needed dimensions weren't available.

When I set out to create them, I discovered that in Dynamics 365 FO you can only do so while the environment is in "maintenance mode". According to documentation, you can put the environment into this mode from Lifecycle Services (LCS), but I didn't find that option available.

After doing some research, I discovered that the quickest way for a non-critical dev or test environment actually is to do a simple update directly on the SQL server, specifically in the AxDB database.

First, to check the current status, run this query:

SELECT VALUE FROM [AxDB].[dbo].[SQLSYSTEMVARIABLES]
    WHERE PARM = 'CONFIGURATIONMODE';

If VALUE is 0, maintenance mode is currently not enabled.

If VALUE is 1, maintenance mode currently is enabled.

So, to enable maintenance mode, run this:

UPDATE [AxDB].[dbo].[SQLSYSTEMVARIABLES]
    SET VALUE = '1'
    WHERE PARM = 'CONFIGURATIONMODE';

And to disable it again, run this:

UPDATE [AxDB].[dbo].[SQLSYSTEMVARIABLES]
    SET VALUE = '0'
    WHERE PARM = 'CONFIGURATIONMODE';

After switching the status, you will usually need to restart the web- and batch services. Sometimes even multiple times before it picks up on the change.

I would not recommend using this approach on a production or otherwise critical environment, but to quickly get to a point where financial dimensions can be activated on a development machine, it works fine :-)

Share on BlueskyShare on FacebookShare on LinkedInShare on TumblrShare on XShare on LinkedInPin on Pinterest

Mikkel Bang Christensen

About the Author

Mikkel Bang Christensen
Mikkel is the creator and owner of miklix.com. He has over 20 years experience as a professional computer programmer/software developer and is currently employed full-time for a large European IT corporation. When not blogging, he spends his spare time on a vast array of interests, hobbies, and activities, which may to some extent be reflected in the variety of topics covered on this website.