How to customize the size of Desktop Central Transaction Log in MS SQL Server?
This document explains you the steps involved in reducing the size of the Desktop Central logs in MSSQL server. If the size of the transaction logs of Desktop Central increases then it might cause, server startup issues. So, it is recommended to clean up these logs periodically or customize the size of the Desktop Central transaction logs.
This document is applicable only for customers using Desktop Central with MSSQL database.
Note: You can also refer to the steps recommended by Microsoft
The following steps needs to be performed on the computer, where Desktop Central Server is installed:
- Go to Run, type services.msc
- Search for ManageEngine DesktopCentral Server and Stop the service.
The following steps needs to be performed on the computer, where MS SQL database is configured:
Steps to change recovery model to "Simple"
- Go to SQL Management Studio
- Navigate to "desktopcentral" database and right click it
- Choose Properties to click Options
- Select Recovery Mode as Simple
Steps to shrink transaction log files
- Under New Query, connect to Desktop Central 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 Desktop Central database. The following query is recommended by Microsoft, to shrink the size of the Desktop Central 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 database. It is recommended only for large database.
DBCC SHRINKDATABASE (database name , target percent)
Example: DBCC SHRINKDATABASE (desktopcentral,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 to the steps recommended in the Microsoft article for more details: Steps to Alter Database File and Filegroup Options Alter database <DATABASENAME > MODIFY FILE (Name = "<DATABASENAME>_log",MAXSIZE=5 GB)
Example: Alter database desktopcentral MODIFY FILE (Name = "desktopcentral_log",MAXSIZE=5 GB), which means Desktop Central log size will not exceed 5 GB
- Restart Desktopcentral Server from the machine, where it is installed.
You can see that Desktop Central log size will now be reduced in the MSSQL database.