How to Shrink .ldf Files (Database Log Files) for a Database in SQL

  1. In SSMS (SQL Server Management Studio), right-click on the database in question and select the Properties option.
  2. On the Options tab, change the Recovery model to Simple, if it is not already set to this:

  3. Click OK.
  4. Right-click on the database again and select Tasks > Shrink > Files:

  5. On the Shrink File... dialog, select Log from the File type drop-down:

  6. Ensure that Release unused space is selected:

  7. Click OK.

Note: This process may need to be done more than once for all space to be released.

Note: If transaction log backups are NOT taken for this database, the Recovery model may remain as is (set to Simple). If transaction log backups ARE taken, set the Recovery model to Full once the space is released.