D365 Enable/Disable maintenance mode for DEV and UAT
There are two ways you can enable maintenance mode.
1. COMMAND:
To enable maintenance mode open command prompt as Admin and execute below command
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode true'
To disable maintenance mode open command prompt as Admin and execute below command
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode false
Make sure you give the correct path of AOS service directory.
2. SQL:
To enable maintenance mode write below query on sql server
update dbo.SQLSYSTEMVARIABLES
set dbo.SQLSYSTEMVARIABLES.VALUE = 1
where dbo.SQLSYSTEMVARIABLES.PARM = 'CONFIGURATIONMODE'
Then go to LCS select your environment go to Maintain tab and select Restart service. New dialog form will open from drop down select IIS and click on confirm button.
To disable maintenance mode change SQLSYSTEMVARIABLES.VALUE to 0 and restart IIS again.
1. COMMAND:
To enable maintenance mode open command prompt as Admin and execute below command
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode true'
To disable maintenance mode open command prompt as Admin and execute below command
J:\AosService\PackagesLocalDirectory\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe --metadatadir J:\AosService\PackagesLocalDirectory --bindir J:\AosService\PackagesLocalDirectory\Bin --sqlserver . --sqldatabase axdb --sqluser axdbadmin --sqlpwd ********* --setupmode maintenancemode --isinmaintenancemode false
Make sure you give the correct path of AOS service directory.
2. SQL:
To enable maintenance mode write below query on sql server
update dbo.SQLSYSTEMVARIABLES
set dbo.SQLSYSTEMVARIABLES.VALUE = 1
where dbo.SQLSYSTEMVARIABLES.PARM = 'CONFIGURATIONMODE'
Then go to LCS select your environment go to Maintain tab and select Restart service. New dialog form will open from drop down select IIS and click on confirm button.
To disable maintenance mode change SQLSYSTEMVARIABLES.VALUE to 0 and restart IIS again.
Comments
Post a Comment