Skip to content
Advertisement

How to reduce SQL log file size

SQL log file size is very big in our production database and hard disk space left only 2G. Is it safe to delete .ldf file?

Advertisement

Answer

Check out this post

In the interim, this should at least allow you to kill the log file:

  1. Perform a full backup of your database. Don’t skip this. Really.
  2. Change the backup method of your database to “Simple”
  3. Open a query window and enter “checkpoint” and execute
  4. Perform another backup of the database Change the backup method of your database back to “Full” (or whatever it was, if it wasn’t already Simple)
  5. Perform a final full backup of the database.
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement