log_reuse_wait_desc showing LOG_BACKUP even I am taking Full(or Transactional Log) Backup

StackOverflow https://stackoverflow.com/questions/23363545

  •  11-07-2023
  •  | 
  •  

سؤال

I have database on production. Recovery model is Full. The problem is that the database log size is keep growing. There is no long running transactions. Reading forums I have found that taking log backup will fix this issue. I have taken full and Transactional Log Backup. But when I run,

SELECT log_reuse_wait_desc, log_reuse_wait FROM sys.databases

The result is,

  LOG_BACKUP    2

Why is this happening? Should I shrink the databse?

هل كانت مفيدة؟

المحلول

Reading forums I have found that taking log backup will fix this issue

Depends a lot on what is the 'issue'. Log backup will free the log (make space available inside the LDF file), but will not shrink the log (make the LDF file smaller). Read How to shrink the SQL Server log.

This should not be a just-in-time rush to fix. You must have a recovery plan in action, which includes a proper backup plan, running automated on a schedule. Is much better to set the recovery to SIMPLE rather than mess with manual log backups.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top