question

Erwin in de Braekt avatar image
Erwin in de Braekt asked

Why is the log file so large

Hi everybody,

There's a database 001;

MDF File :   6.484.992 KB
LDF File : 197.449.984 KB

Why is the logfile so big, how or why does such a thing happen, and how do I shrink / delete / optimize??? this?

I have made a backup, performed maintanance... nothing seems tot work.

Please Help.

Erwin.

databasetransaction-log
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
TimothyAWiseman avatar image
TimothyAWiseman answered

Most likely your database has undergone substantial traffic, is in full recovery mode, and has not had a log backup.

If that is the case, then first make a transaction log backup. This will truncate the log and permit you to shrink the file to your best guess of what it should be. To then prevent this from happening again, you can either schedule regular log backups (how often you should do it depends on a lot of factors, but I use once every 4 hours as a rule of thumb and then adjust to the circumstances) or you can move it to simple recovery mode.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.