?
Solved

SQL 2000 Tempdb Filling up Regulary

Posted on 2003-11-03
4
Medium Priority
?
303 Views
Last Modified: 2008-02-26
I am running SQL server 2000 an a windows platform.

Tempdb is on a separate disk, with about 2,5 gigs of space.
There are 9 databases that access tempdb on the server. My problem is that tempdb does not seem to be clearing old transactions.

It gets full almost once every week and I have to restart the server in order to clear tempdb.
Is there anyone who has a solution.
0
Comment
Question by:evansmats
2 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 800 total points
ID: 9676091
There are may be many reasons why this happens.

This is from MS

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/optimsql/odp_tun_1_5j8l.asp


One that I have found in my environment is:
If stored procedures using temp tables, at the end of stored proc drop temp tables after selecting the result set.

Example (At the end of sp):

select * from #temptable
drop table #temptable

0
 
LVL 34

Expert Comment

by:arbert
ID: 9678667
Also, you don't have to restart the server, you can compress tempdb just like any other database....

Brett
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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

809 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