Log waits

  • Dear All,

    I have a database which is causing job failure looking from the error logs, it states that the log wait should be checked and when checking the results are:

    Logwait description = backup

    Logwait = 2

    The full backup was successful and also the transactionl log backup.

    Would anyone be able to let me know what else requires to be checked please?

    Thank you in advance!

  • Can you explain what's wrong in more detail please? Not sure what you're looking at there or why.

    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
  • Thank you for your reply!

    I have an index job which does a 'Rebuild' but it has been failing with the error message from the error logs as :

    "The transaction log for database is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases"

  • Is your database in Full recovery? If it is in Full recovery, are you running regular log backups? If not, you need to run backups, or you need to run them more frequently.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • If there is a max size set on the file remove it, and if there is no more space left in the drive adding a new file to a different drive will let you continue using the database.

    DBCC OPETRAN will show any long running transactions

    You can try taking a log backup again if reuse the existing log file.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • The database is in 'Full Recovery' model and there is a regular log backup occurring; which is why I ask the question then reason why the Log wait desc = Backup and Log Wait = 2

  • tt-615680 (12/14/2016)


    The database is in 'Full Recovery' model and there is a regular log backup occurring; which is why I ask the question then reason why the Log wait desc = Backup and Log Wait = 2

    Go over this article a few times -

    http://www.sqlskills.com/blogs/paul/why-is-log_reuse_wait_desc-saying-log_backup-after-doing-a-log-backup/

    If you keep getting errors about running out of log space then it's likely that you aren't doing log backups often enough and/or you aren't sizing the log to what it needs to handle the operations in the database.

    Sue

  • Sue_H (12/14/2016)


    tt-615680 (12/14/2016)

    If you keep getting errors about running out of log space then it's likely that you aren't doing log backups often enough and/or you aren't sizing the log to what it needs to handle the operations in the database.

    Sue

    Yep. This * 10,000

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 8 posts - 1 through 7 (of 7 total)

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