Monday, December 21, 2015

How to shrink LDF file in SQL server 2008 R2

  In  Server Management Studio Right click on the database in question and go to Properties:
  • Go to "Options" on the left
  • Change the line "Recovery Model:" from Full to "Simple" and hit OK
  • Right click on the database again, go to Tasks - Shrink - Files
  • Under File Type: select Log and click OK

This will temporarily free up space for you, make sure that your database is set to back up and that its configured to empty the log after back up. Once you have resolved the space issue and made sure your log file is set to flush after backups, I recommend you put the recovery model back on Full. If it was already set to flush the log after backup, check to see why the backups aren't being done.

No comments:

Post a Comment