Thursday, January 27, 2011

Reducing size of MS SQL Server Log File

Couple of days back I realized that my log file has grown out of control. Usually backing up transactions logs and then shrinking the log file should have taken care but I had to take one more step.

I changed the recovery model of the dB from 'Full' to 'Simple' then shrunk the log file and changed the recovery model back to 'Full'. I was able to reduce my .ldf file size from almost 100GB to about 500KB! Quite a resize.

NOTE: Take all cautions while dealing with backend dB. Backups, no users, front end program considerations.

astu. . .