TempDB growth and file size

We have a problem with the size of the tempdb.mdf file. The tempdb had grown to 25Gb and consumed all the available disk space. SQL server was restarted and the tempdb was reset back to the default size. The following day the tempdb suddenly increased in size from 200mb to 25GB within a very short space of time. There were a couple of event log entries from sqlservger regarding thelack of disk. Since then the server is running without any problems but the level of free space is virtually zero on the drive with tempdb.mdf file.

What would cause the tempdb to grow suddenly and to thissize?

Can I control the size the tempdb can grow to?

SQL 2005 (x64) sp1

W2K3 R2 SP1

[1463 byte] By [SimonOM] at [2008-1-9]
# 1
Very common operation which consume tempdb :-

(a) Store explicitly created Temp tables , Table variables, Stored procedure, cursors etc.
(b) Stores Private and Global variable used throughout the instance
(c) Worktables associated with ORDER BY, GROUP BY, CURSOR
(d) Many System administration activities like DBCC commands uses TempDB
(e) If you have choose Snapshot Isolation Level then it uses Tempdb
(f) If your Report Server Uses Caching, then tempdb is used extensively
(g) If your have used SORT_IN_TEMPDB option while rebuilding indexes.
Refer :

Tempdb in Sql Server 2005 -http://www.microsoft.com/technet/prodtechnol/sql/2005/workingwithtempdb.mspx
Shrinking -- http://support.microsoft.com/kb/307487
Concurrency enhancements for the tempdb database --
http://support.microsoft.com/kb/328551
Madhu
MadhuKNair at 2007-10-2 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 2
> Very common operation which consume tempdb :-

I also has a similar issue an find it unlikely that any of the common operation would fill my disk.
I have a 1.4Gb database which has been running for weeks in the current setup.
Last night my 130Gb disk filled up with a 125Gb tempdb.mdf.

I cannot see any operation that would use 125Gb of tempdb with a 1.4Gb database apart from a bug in SQL Server.

Microsoft SQL Server Management Studio 9.00.3042.00
Microsoft Analysis Services Client Tools 2005.090.3042.00
Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)
Microsoft MSXML 2.6 3.0 6.0
Microsoft Internet Explorer 7.0.5730.11
Microsoft .NET Framework 2.0.50727.832
Operating System 5.2.3790

jfp42 at 2007-10-2 > top of Msdn Tech,SQL Server,SQL Server Database Engine...
# 3

I think our problem may have been caused by a large set of parameters being passed to a select statement which was then truncated and left with just an ",," at the end of it.

SimonOM at 2007-10-2 > top of Msdn Tech,SQL Server,SQL Server Database Engine...

SQL Server

Site Classified