Put Dynamics 365 FO virtual machine dev or test into maintenance mode

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, and 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:


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:

    SET VALUE = '1'

And to disable it again, run this:

    SET VALUE = '0'

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 🙂