Solved

tempdb log filled error

Posted on 2007-11-19
5
247 Views
Last Modified: 2009-12-16
This is sql 2000..
I ran a script on a client database to update some fields. The script joins 2 tables and sums up a column from TB2 and updates TB1.

One table has 1786967 records and the other one has 1845936 records. The update took a long time to run, then gave 2 errors: one was deadlock, the other was tempdb transaction log is full error.

I ended up adding another clause to narrow down the resultset but dont want to do that in production.

tempdb's ldf file is 6912KB and the mdf is 284288KB. Doesnt seem large. Do I need to shrink the ldf file?
0
Comment
Question by:Camillia
5 Comments
 
LVL 6

Assisted Solution

by:wshark83
wshark83 earned 100 total points
ID: 20314820
you can either shrink the file or truncate the log file for both your database and tempdb
0
 
LVL 31

Assisted Solution

by:James Murrell
James Murrell earned 100 total points
ID: 20314969
clear the tempDB space there are several  methods.
http://www.support.microsoft.com/?id=307487
0
 
LVL 7

Author Comment

by:Camillia
ID: 20316322
how could tempdb's tlog grow when it's that small and it's on Simple recovery??
0
 
LVL 25

Accepted Solution

by:
imitchie earned 300 total points
ID: 20318597
to perform your update to TB1, sql server has to first process your sums from TB2. this work is done in the tempdb, and because your update is SO intensive (sum a big table, hold results, update other big table) - the whole thing has to
1, be done in an implicit transaction (nothing can touch tb1 or tb2 while it is happening)
2, causes a major expansion of tempdb, even if only temporarily

you should consider
1, temporarily increasing tempdb allocation to insane levels (not the initial, just the max size). you can shrink it back down when update is done; and
2, doing it at a time when no one's on the system!
note: you may still blow the log for the database in use

another option is to break your updates into manageable chunks and perform a series of smaller updates
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 20328328
Thanks
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 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

13 Experts available now in Live!

Get 1:1 Help Now