Jul 13
Trim/Shrink SQL Server Transaction Log Files (Without Shrinking DB)

To shrink the SQL Server log files without shrinking the database can be achieved using the SQL Server Management Studio.

In this scenario I had a SharePoint environment that had a very large 165GB log file (.LDF) that I wanted to trim and reduce in size. My first task was to back up the transaction logs for disaster recovery.

TRANSACTION LOG FILE BACKUP PROCESS

  • Open the SQL Server Management Studio
  • Right Click the DB that has the associated log file of interest
    • Select Tasks > Back Up…
      • Under the Source Backup Type: option choose Transaction Log
        • Click OK

SHRINK LOG PROCESS

  • Open the SQL Server Management Studio
  • Right Click the DB that has the associated log file of interest
    • Select Tasks > Shrink

Make certain to choose Log from the File Type: dropdown menu and your Shrink action.

After selecting OK your SQL transaction log file should be released or reduced to a minimum size.

Comments

Re: Trim/Shrink SQL Server Transaction Log Files (Without Shrinking DB)

 on 2/24/2014 7:19 PM

 ‭(Hidden)‬ Blog Tools