Tuesday, September 5, 2023

How To Enable/disable maintenance mode Tier 1 Microsoft Dynamics 365 Finance and operations

Tier 1 : 

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

SQL

In finance and operations for making any changes in License configuration form, you need to enable maintenance mode and after making desirable changes you need to disable to this mode. You can enable or disable maintenance mode using SQL query as well as command prompt. In this blog, we are performing this operation using the SQL query.

Query status:

You can verify status using following command:-

SELECT * FROM [AxDB].[dbo].[SQLSYSTEMVARIABLES]


Enable maintenance mode:

Click on New Query and enter the following query to enable maintenance mode:-

update dbo.SQLSYSTEMVARIABLESset dbo.SQLSYSTEMVARIABLES.VALUE =1

where dbo.SQLSYSTEMVARIABLES.PARM = ‘CONFIGURATIONMODE’


Restart IIS Express/IIS and do the required steps like enable/disable configuration keys. if required, Execute DB sync

Disable maintenance mode:

after desired changes are made you can disable mode using the following command

update dbo.SQLSYSTEMVARIABLESset dbo.SQLSYSTEMVARIABLES.VALUE =0

where dbo.SQLSYSTEMVARIABLES.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

 

No comments:

Post a Comment