Search
  Home
  Articles
  Backup
  Books
  Certification
  FAQ
  Products
  Replication
  Scripts
  Seminars
  Training
  TSQL

MSDN Fourms
Philippine SSUG

  Resume

MHS Enterprises
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor



Why has my tempdb in SQL Server filled up?

First make sure that you have actually expanded tempdb - as it defaults to 2Mb on the master device only. Create new device(s) for it and expand it onto these devices. Do NOT expand it on master.

How big is tempdb? Remember that for joins/sorts SQL Server may need a significant amount of space depending on the size of the input tables. If you're doing an order by or a group by then SQL is probably using a temp table as an intermediate step. If you're doing a cartesian join, then you're going to need a LOT of space.

After that do a "select type, name from tempdb..sysobjects" to see what is in tempdb - this should give you clue(s) as to what is generating the objects in question and why they are not being deleted.

A prime cause of this is ODBC which has the option per DSN of generating temporary stored-procedures for all the queries per user connection. Most of the time you are better off disabling this option which you can do via the ODBC applet in the control panel.

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.