Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error: Transaction log for database is full

Posted on 2010-08-23
11
Medium Priority
?
672 Views
Last Modified: 2013-11-30
Error at Destination. 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

Where do I look for this?
0
Comment
Question by:qbjgqbjg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 42

Expert Comment

by:dqmq
ID: 33502827
select name,  log_reuse_wait_desc from sys.databases
0
 

Author Comment

by:qbjgqbjg
ID: 33504665
It says NOTHING. So how do I change it and what should I change it to so log will be reused/
0
 
LVL 42

Expert Comment

by:dqmq
ID: 33504808
First, check the database properties to see if you are using simple recovery mode or full recovery mode.

If simple, then you have a long-running transaction that is not ending.  Find it and end it.  Restart the the dbms if necessary.

If full, then do a log backup.  

Also, curious if you are using mirroring, replication, or distributed transactions.  
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:qbjgqbjg
ID: 33504829
I really don't know about the mirroring, replication, or distributed transactions. I am very new to SQL.
0
 

Author Comment

by:qbjgqbjg
ID: 33504883
I went to the database properties. Then options, under recovery it says Page Verify CHECKSUM. Under mirroring it says This database has not been configured for mirroring.
0
 
LVL 42

Accepted Solution

by:
dqmq earned 2000 total points
ID: 33505927
On the options tab, it's near the top. Look for-->Recovery Model:
0
 
LVL 2

Expert Comment

by:Fahad Pathan
ID: 33508043
shrink the transaction files i.e ldf file.
0
 

Author Comment

by:qbjgqbjg
ID: 33511307
Recovery Model says Bulk-logged.
0
 

Author Comment

by:qbjgqbjg
ID: 33511506
Is there a way to make it wrap on the log file and reuse it when it fills up?
0
 

Author Comment

by:qbjgqbjg
ID: 33512009
Based on this information below I set Recover to SIMPLE
:
With the Full or Bulk-Logged recovery mode, inactive transactions remain in the transaction log file until after a Checkpoint is processed and a transaction log backup is made.  Note that a full backup does not remove inactive transactions from the transaction log.  The transaction log backup performs a truncation of the inactive portion of the transaction log, allowing it to be reused for future transactions.  This truncation does not shrink the file, it only allows the space in the file to be reused (more on file shrinking a bit later).  It is these transaction log backups that keep your transaction log file from growing too large.  An easy way to make consistent transaction log backups is to include them as part of your  database maintenance plan.

If your database recovery model is set to FULL, and you’re not creating transaction log backups and never have, you may want to consider switching your recovery mode to Simple.  The Simple recovery mode should take care of most of your transaction log growth problems because the log truncation occurs after the Checkpoint process.  You’ll not be able to recover your database to a point in time using Simple, but if you weren’t creating transactional log backups to begin with, restoring to a point in time wouldn’t have been possible anyway.  To switch your recovery model to Simple mode, issue the following statement in your database.

ALTER DATABASE YourDatabaseName
SET RECOVERY SIMPLE
0
 
LVL 42

Expert Comment

by:dqmq
ID: 33514052
Wow! I never bothered to mention THAT recovery model because it's so rare to encounter a database in that mode.  Glad you found it.    But don't quit now. Please read up on recovery models and make sure to choose FULL or SIMPLE based on the business requirements.  And if you choose FULL, then you need a companion strategy for log backups.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question