How to customize the size of Mobile Device Manager Plus MSP Transaction Log in MS SQL Server?
This document explains the steps involved in reducing the size of the Mobile Device Manager Plus logs in MS-SQL 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 MSP transaction logs.
This document is applicable only for customers using Mobile Device Manager Plus with MS-SQL database.
Note: You can also refer the steps recommended by Microsoft.
The following steps need to be performed on the computer, where Mobile Device Manager Plus MSP is installed:
- Go to Run, type services.msc.
- Search for ManageEngine Mobile Device Manager Plus MSP server and stop the service.
The following steps need to be performed on the computer, where MS-SQL database is configured:
- Go to SQL Management Studio.
- Navigate to "memdm" database and right click it.
- Choose Properties and click Options.
- Select Recovery Mode as Simple.
- Under New Query, connect to Mobile Device Manager Plus database to execute the 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:
- 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.
DBCC SHRINKDATABASE (database name , target percent)
Example: DBCC SHRINKDATABASE (mdm,20)
- 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 the steps recommended in the Microsoft article for more detail: Steps to Alter Database File and Filegroup Options.Alter database <DATABASENAME > MODIFY FILE (Name = "<DATABASENAME>_log",MAXSIZE=5 GB)
Example: Alter database mdm MODIFY FILE (Name = "mdm_log",MAXSIZE=5 GB), which means Mobile Device Manager Plus log size will not exceed 5 GB
- Restart Mobile Device Manager MSP server on the machine, where it is installed.
You can see that Mobile Device Manager Plus MSP log size will now be reduced in the MS-SQL database.