?
Solved

cannot backup transaction log

Posted on 2008-10-29
2
Medium Priority
?
956 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 800 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 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.
Suggested Courses

800 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