How to shrink LDF File SQL Management Studio SCCM

Recently noticed my SCCM server data drive was running out of space. Didn’t make sense as we haven’t added anything substantial lately or used USMT.

Installed WinDirStat and found the culprit to be a 400GB .ldf log file from SCCM.

The fix was pretty painless and takes less than 10mins.

  • Backup the database
  • Stop the database service
  • Shrink the .ldf file

Start by opening up SQL Server Management Studio and connect to the server.

Expand the Databases object.

Right-click the database and select Tasks > Backup. 

  • Set Backup type: Full
  • Add a backup destination
  • Click OK when done.
Change Backup type to Full.
Database Backup


Now the backup is complete we need to shrink the file. Stop the SQL Server service, then right-click on the database and select Tasks > Shrink > Shrink Files.

  • Change File type to Log
  • Click OK


The log file should now be cleaned up!


via Pitney Bowes

Show More

Cory Fiala

Technology and outdoor enthusiast. Currently the sole systems administrator for a local K-12 school district with 800+ staff and 5,500+ students. I support windows servers, Linux systems (FreeBSD and Ubuntu), along with vSphere (4 node cluster). 60+ virtual machines and 8 physical servers. This doesn't include my personal homelab.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button