Solved

cannot backup transaction log

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

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.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now