Solved

transaction log full in sql server 2005

Posted on 2010-11-25
12
498 Views
Last Modified: 2012-06-27
Hi,
I am getting this error and cannot find a solution for this problem even thought i shrunk the log fle several times.  here is the error:
Error: 9002, Severity: 17, State: 2
The transaction log for database '%.*ls' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
0
Comment
Question by:karinos57
  • 3
  • 3
  • 3
  • +2
12 Comments
 
LVL 32

Expert Comment

by:ewangoya
Comment Utility
Check if your are running ouf disk space or you set the maximum size for the log file.
0
 

Author Comment

by:karinos57
Comment Utility
i am getting disk space error and also it is set to max size for the log file but  i tried to change the log file to grow automatically but it won't let me do anything.  pls advise
0
 
LVL 6

Expert Comment

by:rkannan2000
Comment Utility
Try COMMIT or ROLLBACK explicitly for the previous transactions(if any)...I hope this should fix the issue..
0
 

Author Comment

by:karinos57
Comment Utility
i am new to sql server, can u tell me how to commit or rollback
0
 
LVL 6

Expert Comment

by:rkannan2000
Comment Utility
This link might help you understand the root cause and solution.

http://support.microsoft.com/kb/317375
0
 
LVL 6

Expert Comment

by:rkannan2000
Comment Utility
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 3

Expert Comment

by:expert_dharam
Comment Utility
Do the following when users are not accessing the DB:

1. Detach the database
2. Locate the folder where your DBs .mdf and .ldf files are located.
3. Move(Cut-Paste) the .ldf file for the respective DB to another PC.
4. Go back to SSMS and attach the DB back by selecting the .mdf file.

This will create a new .ldf file automatically.
Keep log file setting to 'Auto Grow 10%'
(Make sure you backup your DB before performing the steps above.)

Best of luck!!
0
 
LVL 32

Expert Comment

by:ewangoya
Comment Utility

@expert_dharam

Thats not a solution
0
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
Comment Utility
Try and get some free space on your disk by deleting temporary files

run the following commands

-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE YOURDATABASE
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 2 MB.
DBCC SHRINKFILE (YOURDATABASELOG, 2);
GO
-- Reset the database recovery model.
ALTER DATABASE YOURDATABASE
SET RECOVERY FULL;

Now this may just solve your problem temporarily until you run out of disk space again. Install some more disk space or move your database to a server with more space
0
 
LVL 3

Expert Comment

by:GSGDBA
Comment Utility
Yes, ewangoya is correct.
0
 
LVL 3

Expert Comment

by:expert_dharam
Comment Utility
@ewangoya: Thanks for correcting me.

@karinos57: Did you tried it yet?
0
 

Author Closing Comment

by:karinos57
Comment Utility
thanks.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now