# How to customize the size of Mobile Device Manager Plus Transaction Log in MS SQL Server? Last updated: July 24, 2026 Reduce or cap the Mobile Device Manager Plus transaction log size in MS SQL Server using `DBCC SHRINKDATABASE` to free space or `ALTER DATABASE` to set a maximum size limit; requires stopping the MDM service and setting database recovery mode to Simple to prevent startup issues from excessive log growth. ## Description This document explains the steps involved in reducing the size of the Mobile Device Manager Plus logs in MSSQL server. If the size of the transaction logs of Mobile Device Manager Plus increases then it might cause server startup issues. So, it is recommended to clean up these logs periodically or customize the size of the Mobile Device Manager Plus transaction logs. This document is applicable only for customers using Mobile Device Manager Plus with MSSQL database. Note: You can also refer the steps recommended by Microsoft. 1. [http://msdn.microsoft.com/en-us/library/bb522469.aspx](http://msdn.microsoft.com/en-us/library/ms190488.aspx) 2. [http://msdn.microsoft.com/en-us/library/ms190488.aspx](http://msdn.microsoft.com/en-us/library/ms190488.aspx) ## Steps The following steps need to be performed on the computer, where Mobile Device Manager Plus Server is installed: 1. Go to Run, type **services.msc**. 2. Search for **ManageEngine Mobile Device Manager Plus server** and stop the service. The following steps need to be performed on the computer, where MS SQL database is configured: 1. Go to SQL Management Studio. 2. Navigate to "**memdm**" database and right click it. 3. Choose **Properties** and click **Options**. 4. Select **Recovery Mode** as **Simple**. 5. Under **New Query**, connect to Mobile Device Manager Plus database to execute one of the following queries. You can choose to either shrink the size of the log or alter the size of the log as mentioned below: 1. Shrink the size of the Mobile Device Manager Plus database. The following query is recommended by Microsoft to shrink the size of the Mobile Device Manager Plus database. Using this query, you can determine the size of the database and shrink the available free space in terms of percentage. If you specify the value as "20%" then the size of the database will be shrunk by 20%, if there is available free space. This will not work for smaller databases. It is recommended only for large databases. ```sql DBCC SHRINKDATABASE (database name, target percent) ``` Example: ```sql DBCC SHRINKDATABASE (mdm,20) ``` 2. Alter Database Modify File can be used to alter the size of the transaction logs. You can use this to increase or decrease the memory used for storing the transaction logs. Refer to the steps recommended in the Microsoft article for more detail: [Steps to Alter Database File and Filegroup Options](http://msdn.microsoft.com/en-IN/library/bb522469.aspx). ```sql ALTER DATABASE MODIFY FILE (Name = "_log", MAXSIZE=5 GB) ``` Example: ```sql ALTER DATABASE mdm MODIFY FILE (Name = "mdm_log", MAXSIZE=5 GB) ``` This means Mobile Device Manager Plus log size will not exceed 5 GB. 6. Restart Mobile Device Manager server on the machine where it is installed. You can see that Mobile Device Manager Plus log size will now be reduced in the MSSQL database. ## Frequently asked questions ### Why would I need to customize the Mobile Device Manager Plus transaction log size in MS SQL Server? If the transaction log keeps growing, it can cause server startup issues, so it is recommended to periodically shrink or cap the log size. ### What's the difference between shrinking the database and altering the log file size? `DBCC SHRINKDATABASE` frees existing space by a target percentage and works best on large databases, while `ALTER DATABASE MODIFY FILE` lets you set a fixed maximum size, for example, `MAXSIZE=5 GB`, for the transaction log file going forward. ### Do I need to stop any services before running these steps? Yes, stop the ManageEngine Mobile Device Manager Plus server service first, set the database recovery mode to Simple in SQL Management Studio, run the shrink or alter query, and then restart the Mobile Device Manager Plus server.