If you back up your transaction log every hour through a maintenance plan, why does your log file continue to grow? I would think the system would delete or shrink the log after the backup. Is this something I want to do?
Asked
Active
Viewed 52 times
2 Answers
1
- Because the size of it is not big enough to handle the size of the transactions every hour.
or
- Something is preventing the log from getting cleared after the log backup completes. Check the
log_reuse_wait_desccolumn inmaster.sys.databasesto see why it isn't clearing out.
Consider backing up the transaction logs more frequently than hourly. I recommend every 1-5 minutes.
András Váczi
- 31,778
- 13
- 102
- 151
Tara Kizer
- 5,986
- 1
- 17
- 28
0
Other than the reasons @Tara mentioned, you also need to ensure that your backup succeeds. Usually you need to ensure two things
- There is no open transaction hungup there in the database using
dbcc opentran
DBCC OPENTRANhelps to identify active transactions that may be preventing log truncation.DBCC OPENTRANdisplays information about the oldest active transaction and the oldest distributed and nondistributed replicated transactions, if any, within the transaction log of the specified database
- Before / after each log backup, run
dbcc sqlperf(logspace)to see whether the[Log Space Used(%)]column has changed from big to small.
András Váczi
- 31,778
- 13
- 102
- 151
jyao
- 3,083
- 1
- 14
- 27