Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction log is still full after backup with truncate_only

Status
Not open for further replies.

gday2u

Programmer
Apr 3, 2003
6
AU
I am running SQLServer 2000.
I have a database which is in Simple recovery mode.
There is a DTS package which I run everynight which copies
data from an external data source.

However, it tells me that the transaction log for the
database is full.

I have put the following SQL task as the first step
in the package with the following sql :

backup log profis with truncate_only
go
dbcc shrinkdatabase(profis,20)
go

However, I still get the same error.
I tried the shrinkdatabase command in desperation because
the log back did not seem to make any difference.

I would appreaciate any feedback on this.
 
How is your log set to grow?

It may not be set to grow fast enough for the DTS job.

If you aren't 'growing' your log fast enough, truncating it won't make a difference. Here's why:

1. You truncate the log
2. You run the DTS job
3. The DTS job is adding 500 MB of data
4. Your log is set to increase only by 10 MB
5. The log growth can't keep up with the DTS job and fills up before it can expand enough.
6. Job fails because log is full.

Solution: Change the amount the log grows by to match the DTS job.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top