There have been a number of times I have come across SQL Server databases where the transaction log files have become enormous (many times the size of the actual MDF file). The last one I dealt with grew to 50GB.
I have been reading a number of articles about truncating and shrinking, but I'm still not clear on why this happens.
I fully expect the log file to grow proportionately as the MDF file gets bigger, but what I see is it growing many times larger than the MDF.
Is there a certain maintenance command that should be applied to the database to prevent this bloating of the transaction log file? At one time I thought that running a BACKUP had the effect of truncating the log, but this doesn't seem to be the case with these particular databases.
The articles I read indicate the bloating happens because of poor code, such as when transactions are not closed. My impression is that if the database and application are well designed this bloating does not happen. Is this correct?
I have been reading a number of articles about truncating and shrinking, but I'm still not clear on why this happens.
I fully expect the log file to grow proportionately as the MDF file gets bigger, but what I see is it growing many times larger than the MDF.
Is there a certain maintenance command that should be applied to the database to prevent this bloating of the transaction log file? At one time I thought that running a BACKUP had the effect of truncating the log, but this doesn't seem to be the case with these particular databases.
The articles I read indicate the bloating happens because of poor code, such as when transactions are not closed. My impression is that if the database and application are well designed this bloating does not happen. Is this correct?