Skip to main content

How To Enable / Disable Maintenance mode Using SQL query in Dynamics 365 for Finance & Operations


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.

The following are steps to enabling/disabling maintenance mode:-


  1. Open SSMS(Microsoft SQL Server Management Studio) in your server.
  2. 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'
  3. You can verify status using following command:-

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

  4. After this restart IIS services in some cases, you need to restart the server.
  5. perform your changes to the License configuration form.
  6. after desired changes are made you can disable mode using following command

    update dbo.SQLSYSTEMVARIABLESset dbo.SQLSYSTEMVARIABLES.VALUE =0
    where dbo.SQLSYSTEMVARIABLES.PARM = 'CONFIGURATIONMODE'


  7. Now again you can verify status using the same query in step 3 and again repeat step 4.

    I hope this blog will help you

Comments

Popular posts from this blog

Import Database from UAT/Production to cloud-hosted or dev environment | D365 Finance and operations

Update: If following method is not working have a look at this  Changes in SQL Script to restore bacpac file for D365FO Many times to debug the Production environment issues we might need live data to address that issue in such case first of all we need to refresh the UAT/Sandbox database with the Production environments database and then afterward we need to export the UAT database to the Asset library from where we can get bacpac file for that UAT database which is then to be imported in your cloud-hosted or one-box environment. This blog and video demonstration will help you to restore your production or UAT database to a cloud-hosted environment. Step 1: Rename existing db  In this step, we need to rename the existing AxDB for safety purposes. Just go to the SSMS application and execute the following command:-   ALTER DATABASE [ip_ent_site] SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO ALTER DATABASE [ip_ent_site] MODIFY NAME = [ip_ent_site_new] GO ALTER DATABASE [ip_ent...

Changes in SQL Script to restore bacpac file for D365FO

There are changes in SQL db import it needs additional parameters now  Connection Security Improvements in SqlPackage 161 | Microsoft Community Hub otherwise it will throw following error *** Changes to connection setting default values were incorporated in a recent release.  More information is available at https://aka.ms/dacfx-connection *** Error importing database:Could not import package. Unable to connect to target server 'localhost'. Please verify the connection information such as the server name, login credentials, and firewall rules for the target server. A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) The certificate chain was issued by an authority that is not trusted. *** The settings for connection encryption or server certificate trust may lead to connection failure if the server is not properl...

Develop Custom Workflow:Counting Journals workflow

In this blog, you will learn how to develop a custom workflow that is not present out of the box in D365 Finance. For this blog I’m creating a workflow for Counting Journal ( Inventory management>>Journal Entries>>Item Counting>>Counting ) because there is no such workflow for inventory management module. The followings are steps that are to be followed. Steps:- 1.        Create a base Enum for Document Status 2.        Create a table extension and add Enum to table 3.        Add document status field to form extension 4.        Create query 5.        Create workflow category 6.        Create a workflow type 7.        Now add can submit workflow and updateworkflow methods to tables class extension 8.        Upda...