Initial log file size growth

  • Hi!

    Can someone tell me why the initial logfile size (set to 3gb) on a new log file grows as the log file grows? I thought the initial size would stay the same so when shrink the log file with truncate only it would reduce the the initial size of 3gb

  • TRUNCATE ONLY has been removed in SQL 208 onwards due to the nature of the command and people miss using it and not understanding the consequences.

    A log will grow as and when it needs to and to keep on top of it, transaction log management needs to be put in place.

    Ensure that you are taking regular transaction log backups if your recovery model is Full or Bulk-Logged.

    Managing Transaction Logs - http://www.sqlservercentral.com/articles/Administration/64582/

    Stairway to Transaction Log Management - http://www.sqlservercentral.com/stairway/73776/

    If transaction log management is in place, then the log must of needed to grow to that size to handle transactions going on.

    The only way to release the space is to ensure the LOG_REUSE_WAIT_DESC in sys.databases is NOTHING then shrink the file using DBCC SHRINKFILE.

    Shrinking files is not recommended, if the log grew to that size due to normal behavour, it is more than likely going to grow again.

    If the growth was due to a one off processes and you know the log wont grow that big for another amount of time, you will be ok with a one off shrink. But dont make shrinking part of your daily tasks.

  • if you mean the initial size as shown via the database properties in SSMS this nomenclature is misleading, it is in fact that ACTUAL size of the file, including any growths that haver occurred.

    The exception to this is tempdb where initial size is just that, the size tempdb is created when SQL first starts up, not its ACTUAL size following file growths as activity ramps up.

    ---------------------------------------------------------------------

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply