SQL log file grows huge

  • Hi,

    In one of our server, we are taking transaction log backup every 1 hr still the log file grows huge for a user database(full recovery model). I cannot see and long running or uncommitted transactions. Could you please guide me finding the root cause of this issue?

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • How big is the log "normally" and how much has it grown to?

  • Have a read through this: http://qa.sqlservercentral.com/articles/Transaction+Log/72488/

    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
  • create checkpoint then take log backup and then truncate log files

    CHECKPOINT;

    BACKUP LOG [TEST] ......

    GO

    DBCC SHRINKFILE('Log file 1 name',TRUNCATEONLY);

    DBCC SHRINKFILE('Log file 2 name',TRUNCATEONLY);

    GO

    take orignal and final backup some other place then apply this one will overwrite option

    Regards,

    Syed Jahanzaib Bin Hassan

    MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

    My Blog

    http://www.aureus-salah.com

    Regards,
    Syed Jahanzaib Bin Hassan
    BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

    My Blog
    www.aureus-salah.com

  • Hi,

    The log has grown to 48Gb in one month where the database size is 43 GB.

    I have checked log_reuse_wait_desc and it shows LOG_BACKUP

    MSDN site says "A log backup is required to move the head of the log forward (full or bulk-logged recovery models only).

    (Note

    Log backups do not prevent truncation. )

    When the log backup is completed, the head of the log is moved forward, and some log space might become reusable."

    Log back is taken every hour and no_truncate option is not included while taking the backup.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Check that the log backups are succeeding.

    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
  • Log backups are taken successfully every hour.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Any big data load or reindexing?

  • I am not sure about the big data load since I have no information what the appliaction does.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • How often do you do your FULL backup? or when was the last time that FULL backup was run?

  • Sumanta Roy (4/19/2011)


    I am not sure about the big data load since I have no information what the appliaction does.

    Reindexing job? That's usually culprit #2 right after not taking successfull log backups.

  • Full backup is taken every week Sunday.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Sumanta Roy (4/19/2011)


    Full backup is taken every week Sunday.

    REINDEX ??????????????????????????????????????????????????????????????????????

  • We do have one reindexing job based on the fragmentation which runs every week sunday. So every table will not be affected. Log backups are taken successfully.

    Ryan
    //All our dreams can come true, if we have the courage to pursue them//

  • Fine, assuming the log backups are running fine.

    Shrink the t-log a couple minutes before the reindexing. And see how big it grows back to after the job has run.

    Even if the job is selective, it can still reindex a whole freaking lot. That's your best bet at the moment.

Viewing 15 posts - 1 through 15 (of 15 total)

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