Sql-server – SHRINK LOG FILE


I have a general question, maybe too simple, but I really need to understand it. Is it correct to shrink a log file up to its initial size or it is better to give higher value ? Thanks in advance.

Best Answer

It depends of your logfile activity and associated autogrowth percentage. shrinking a big .ldf file could lead to increase I/O in the case of further and repeated extends on it. For example, for a 50GB file with 10% autogrowth you will have only one increase by 5GB. But with a 5MB file you will have continuous increase (5Mo x 10% = y - y x 10% = some value) etc. What is your current configuration ?

You can see autoextends activity by starting a report "disk usage" (sorry it's in french) :

enter image description here