Shrink the Transaction Log File of a Large SOTI MobiControl Database

Publish Date: 05-Feb-2024 Last Modified Date: 16-Sep-2025 SOTI MobiControl, SOTI XSight, SOTI Connect
779 0

Summary

This article explains how to reduce the size of a transaction log file (.ldf) for a SOTI MobiControl database when it grows excessively large and impacts server performance.

Related SOTI ONE Platform Products

SOTI MobiControl;SOTI XSight;SOTI Connect

Situation

When transaction log files are not properly maintained, they can grow larger than the database itself, degrading SQL Server and SOTI MobiControl performance. This procedure helps shrink the log file and improve server responsiveness.

Environment

  • Windows Server 2016
  • Microsoft SQL Server
  • SOTI MobiControl Database

Process Description

This process involves three steps:

  1. Checking the transaction log file size.
  2. Changing the database recovery model.
  3. Shrinking the transaction log file.

 

Step One: Check the Transaction Log File Size

1. On the SOTI MobiControl SQL Server, navigate to the SQL data folder (typically located at:

D:\Program Files\Microsoft SQL Server\

2. Compare the file sizes of:

  • MobiControlDB.mdf (database file)
  • MobiControlDB_log.ldf (transaction log file)

3. If the transaction log file is larger than the database file, proceed to shrink the log.

 

Step Two: Change the Database Recovery Model

1. Open SQL Server Management Studio (SSMS).

2. In Object Explorer, right-click the SOTI MobiControl database and select Properties.

3. Select the Options tab.

image

5. Verify that the Recovery model is set to Simple. If not, change it to Simple, then select OK to save.

Important: Using the Simple recovery model reduces the ability to restore point-in-time backups. Make sure this aligns with your organization's backup strategy.

 

Step Three: Shrink the Transaction Log File

1. In Object Explorer, select the SOTI MobiControl database.

2. Select New Query.

3. Run the following commands:

DBCC LOGINFO('MobiControlDB')
CHECKPOINT
EXEC sp_flush_log
DBCC SHRINKFILE (MobiControlDB_Log, 250)

Verification and Validation

Review the results:

  • Fewer rows in the result DBCC LOGINFO indicate that the transaction log has successfully shrunk.
  • You may need to repeat the script multiple times until the log size is sufficiently reduced.

Was this helpful?