Enable/disable D365 maintenance mode

Tier 2: Enable/disable D365 maintenance mode can be done from LCS:

There are the following ways to enable/disable maintenance mode on DEV/could hosted boxes:

SQL

Query status:
use AXDB;
select * from dbo.SQLSYSTEMVARIABLES where PARM = 'CONFIGURATIONMODE';
Enable maintenance mode:
use AXDB;
update SQLSYSTEMVARIABLES SET VALUE = 1 where PARM = 'CONFIGURATIONMODE';
Restart IIS Expres/IIS and do the required steps like enable/disable configuration keys.
Execute DB sync

Disable maintenance mode:
use AXDB;
update SQLSYSTEMVARIABLES SET VALUE = 0 where PARM = 'CONFIGURATIONMODE';

CMD

Open command prompt as administrator.
Enable maintenance mode (replace **axdbadmin_from_lcs** value):
K:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd **axdbadmin_from_lcs** --setupmode maintenancemode --isinmaintenancemode true
Disable maintenance mode (replace **axdbadmin_from_lcs** value):
K:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd **axdbadmin_from_lcs** --setupmode maintenancemode --isinmaintenancemode false

D365FO.Tools

Open PowerShell as Administrator
Installation of d365fo tools:
Install-Module -Name d365fo.tools
Query status:
Get-D365MaintenanceMode
Enable maintenance mode:
Enable-D365MaintenanceMode
Disable maintenance mode:
Disable-D365MaintenanceMode
List of all d365fo tools commands:

Support The Author

 If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.

Buy Me a Coffee

Post a Comment


All Comments


No comments. Be the first one to comment on this post.

Search

About

DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics 365 FO.

Authors are allowed to set their own "buy me a coffee" link.
Join us.

Blog Tags