THe Transaction log for database is full

Jinal Contractor 121 Reputation points
2021-01-04T13:22:33.33+00:00

Hello,
I been facing below error from last two days.
I took full backup and Transaction log backup after that but still some SQL jobs has been failing with below error.

Error :- The transaction log for database 'DB' is full due to 'LOG_BACKUP'. [SQLSTATE 42000] (Error 9002). The step failed.

Drive is empty where we save our logs files at.
What should causing this?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,850 questions
0 comments No comments
{count} votes

Accepted answer
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2021-01-04T14:43:39.12+00:00

    I can't say how large your log files has to be, but they are now extremely small compared to the database size. Perhaps start by having just one log file and make it some 20% of the data size, as a starting point. The configure a reasonable autogrow fot hat log file. Not pecentage. Perhaps 1 GB, as a staring point. And don't shrink the log file (in case you do).

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Olaf Helper 44,741 Reputation points
    2021-01-04T13:45:45.497+00:00

    What returns this query for the database?

    select name, log_reuse_wait_desc
    from sys.databases 
    

  2. tibor_karaszi@hotmail.com 4,311 Reputation points
    2021-01-04T14:14:21.487+00:00

    Perhaps the log was full while that job was running, hence the job failed. But at a later time you emptied the log by doing a log backup.

    I.e., you need a larger ldf file, quite simply!


  3. Cris Zhan-MSFT 6,631 Reputation points
    2021-01-05T01:54:35.05+00:00

    Hi @Jinal Contractor ,

    >Error :- The transaction log for database 'DB' is full due to 'LOG_BACKUP'. [SQLSTATE 42000] (Error 9002). The step failed.

    When the transaction log becomes full, SQL Server Database Engine issues a 9002 error.

    This document records some general recommendations when you are working with transaction log files.
    Manage the size of the transaction log file

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.