MicrosoftSCCM

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

Tags
Show More

Cory Fiala

Technology and outdoor enthusiast. Anything from desktops to servers with a side of mountain biking and skiing. Life is good!

Related Articles

Leave a Reply

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

Close
Close