28.01.2018

MS SQL Server: How to decrease ldf size

Not so long a go I found that one of my MS SQL DB Servers ran out of disk space. The source of the problem was very huge ldf file size of one of the databases. I needed to free disk space so I wanted to make ldf smaller. Neither database nor files shrink did help. Nevertheless I found a simple way to do the job:

  • Open 'Options' of the database with big ldf.
  • Change recovery model to Simple. Full is set by default.
  • Try to shrink your log files again.
After these steps you will have you ldf decreased. Now you can change the log file growth policy (I recomend it to grow by Mb not percentage) and change recovery model back to Full if needed.

Комментариев нет:

Отправить комментарий