Big log File

  • Hi all,

    I would what you recomend to do that i can limit the size of my log file that have 98Gb...

    If any can help me i will be graetfull

    thaks,

    Pedro

  • I would suggest some reading material on transaction log management

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

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

    Why is my transaction log full - http://www.sqlservercentral.com/articles/Transaction+Logs/72488/

    Accidental DBA Guide - Chapter 8 - http://www.sqlservercentral.com/articles/books/76296/

    What is the output of the following query,where ... is the name of the DB with 98GB log file.

    select recovery_model_desc, log_reuse_wait_desc from sys.databases where name = '....'

  • What size is your datafile? If 400GB then 98Gb is ok. If not what recovery mode is db in? Full? Are you taking tran log backups? No? Only full baks then -> do the following:

    Right-click db | Properties | Options | Change Recovery Model = Simple. Ok.

    right-click db | Tasks | Shrink | Files | File type drop down: Log, chose Release unused space. Click Ok.

    If doesn't shrink, do above again, follow closely.

    If take tran log baks, reset to Recovery Model = Full, then take a full backup.

    Regards,

    Chris

    mssqlconsulting.com

    Chris Becker bcsdata.net

  • Chris Becker (12/6/2012)


    If not what recovery mode is db in? Full? Are you taking tran log backups? No? Only full baks then -> do the following:

    Right-click db | Properties | Options | Change Recovery Model = Simple. Ok.

    Um... So the correct approach is just to set the DB to simple recovery with no mention of what that does, rather than investigate whether point in time recovery is needed or not and then dependent on that either start taking log backups or set to simple recovery?

    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
  • File is 98gb, I presume the db file is not nearly as big, they don't manage log files, nor know how to point-in-time recover, or they wouldn't be reaching out. I agree read the links and learn, here is a quick and dirty how to truncate & shink.

    Then... take full bak & reset to full model if needed.

    Chris Becker bcsdata.net

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

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