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
Solved

transaction log full in sql server 2005

Posted on 2010-11-25
12
508 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
ID: 34214089
Check if your are running ouf disk space or you set the maximum size for the log file.
0
 

Author Comment

by:karinos57
ID: 34214103
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
ID: 34214122
Try COMMIT or ROLLBACK explicitly for the previous transactions(if any)...I hope this should fix the issue..
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

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

Expert Comment

by:rkannan2000
ID: 34214134
This link might help you understand the root cause and solution.

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

Expert Comment

by:rkannan2000
ID: 34214148
0
 
LVL 3

Expert Comment

by:expert_dharam
ID: 34214876
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
ID: 34214885

@expert_dharam

Thats not a solution
0
 
LVL 32

Accepted Solution

by:
ewangoya earned 500 total points
ID: 34215038
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
ID: 34218721
Yes, ewangoya is correct.
0
 
LVL 3

Expert Comment

by:expert_dharam
ID: 34219079
@ewangoya: Thanks for correcting me.

@karinos57: Did you tried it yet?
0
 

Author Closing Comment

by:karinos57
ID: 34219188
thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

838 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