Solved

cannot backup transaction log

Posted on 2008-10-29
2
954 Views
Last Modified: 2012-05-05
hi all,

I can't perform SQL maintenance anymore, when I run the following script :

delete from decade_history..tblnotifyqueue where decade_receivedt < '20-Sep-2008'

it said :

Server: Msg 9002, Level 17, State 6, Line 1
The log file for database 'DECADE_HISTORY' is full. Back up the transaction log for the database to free up some log space.

so i try to backup the translog by running this script :



alter database DECADE_HISTORY set recovery full

use DECADE_HISTORY

backup log DECADE_HISTORY to disk='c:\Temp\Log1.bak'
dbcc shrinkfile (DECADE_HISTORY_Log, TRUNCATEONLY)
backup log DECADE_HISTORY to disk='c:\Temp\Log2.bak'
dbcc shrinkfile (DECADE_HISTORY_Log, TRUNCATEONLY)
backup log DECADE_HISTORY to disk='c:\Temp\Log3.bak'
dbcc shrinkfile (DECADE_HISTORY_Log, TRUNCATEONLY)

use master
alter database DECADE_HISTORY set recovery FULL

the error is :

Server: Msg 9002, Level 17, State 6, Line 2
The log file for database 'DECADE_HISTORY' is full. Back up the transaction log for the database to free up some log space.
Could not write a CHECKPOINT record in database ID 9 because the log is out of space.
Processed 4103 pages for database 'DECADE_HISTORY', file 'DECADE_HISTORY_Log' on file 2.
BACKUP LOG successfully processed 4103 pages in 2.081 seconds (16.151 MB/sec).

(1 row(s) affected)

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Processed 4103 pages for database 'DECADE_HISTORY', file 'DECADE_HISTORY_Log' on file 2.
BACKUP LOG successfully processed 4103 pages in 2.518 seconds (13.348 MB/sec).

(1 row(s) affected)

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Processed 4103 pages for database 'DECADE_HISTORY', file 'DECADE_HISTORY_Log' on file 3.
BACKUP LOG successfully processed 4103 pages in 1.642 seconds (20.470 MB/sec).

(1 row(s) affected)

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Server: Msg 9002, Level 17, State 6, Line 14
The log file for database 'DECADE_HISTORY' is full. Back up the transaction log for the database to free up some log space.
Could not write a CHECKPOINT record in database ID 9 because the log is out of space.




Please advise, I am not a DBA.  My DBA said upgrade the hard disk   but this server is VERY VERY old......


Thanks.


0
Comment
Question by:binary_1001010
[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
2 Comments
 
LVL 5

Accepted Solution

by:
Aanvik earned 200 total points
ID: 22838243
Use Master
backup log DECADE_HISTORY with no_log

Use DECADE_HISTORY
dbcc shrinkfile(DECADE_HISTORY_Log, 0, truncateonly)

you can use the above commands and it should truncate the Log files.
0
 
LVL 41

Assisted Solution

by:graye
graye earned 50 total points
ID: 22840421
I'd be checking to see if you're also out of physical disk space... or it's just the log file that is out of space.
Log files can be configured to automatically grow (that's the default)... if true, then you'd be out of disk space.    Or, they can be configured not exceed a certain size (which probably isn't a good idea)... then you'd just need to adjust the "quota" allowed for the file.
Take a look at the following article as it describes how to a) fix the problem, b) prevent it from happening again.   There is also a section on how to diagnose why a shrink operation might fail
http://home.hot.rr.com/graye/Articles/SQL_LogMaintenance.htm
 
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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.
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

718 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