Home Forums SQL Server 2005 Backups DBCC SHRINKFILE to clear the log file RE: DBCC SHRINKFILE to clear the log file

  • Truncate is not the same as shink. Was my explaination not clear?

    Truncate just marks space inside the file for reuse. Shrink changes the size of the file.

    Truncates occur on checkpoint in simple recovery mode and on log backup in full recovery mode.

    SQL will not shrink a file without been told to do so.

    In general, shrinking files is a bad idea. The file will just grow again, causeing file level fragmentation and taking up resources.

    It's best to size a log file for the max it needs to be and then leave it alone.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass