Need to Know about Logspace

  • Can any one Help me ....I Need to Know that I have set my Database Log Gile size 20GB and it increase upto 40 GB.Need to Know about both the situation when Recovery Model is Simple and Full.Should I Shrink the File or Truncate it???One more think Result of DBCC Sql PERf (Logspace) is88Mb Log size and 66% is used.

    Please clarify what it is meant by 88 MB Total log size and what is meant by 66% Log size ???

  • sqlquestions15 (6/14/2009)


    Can any one Help me ....I Need to Know that I have set my Database Log Gile size 20GB and it increase upto 40 GB.Need to Know about both the situation when Recovery Model is Simple and Full.Should I Shrink the File or Truncate it???One more think Result of DBCC Sql PERf (Logspace) is88Mb Log size and 66% is used.

    Please clarify what it is meant by 88 MB Total log size and what is meant by 66% Log size ???

    Truncating and shrinking log files are two different concepts. Truncating removes committed entries from the log reclaiming the space freed by removal of these trasactions which can be reused later.

    Shrinking activity involves physically reducing the file, releasing back the unused space within the log file back to OS.

    In this case 88MB is the physical size of the log file out of which 66% is actually used and remaining 34% is lying unused.



    Pradeep Singh

  • sqlquestions15 (6/14/2009)


    Need to Know about both the situation when Recovery Model is Simple and Full.

    When the recovery mode is full, all transactions remain in the log file. You have to back up your transaction log which means space occupied by all committed transactions can be reused later(it doesnt physically reduces the size).

    When the recovery mode is simple, SQL Server keeps on firing checkpoint at regular intervals which force dirty pages (transactions which are committed but not yet written to the database as yet) to be written to the database which in turn keeps on leaving ample 'vacant' space within the log file and thereby restricting the log growth.



    Pradeep Singh

  • Please read through this - Managing Transaction Logs[/url]

    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

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

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