Solved

cannot backup transaction log

Posted on 2008-10-29
2
953 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

733 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