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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you shrink the tempdb database size???

Status
Not open for further replies.

sadcaper

Programmer
Dec 11, 2001
4
US
We had a process continually run that totally filled up the tempdb which had the option of increase size and no max file size. So now the file size is 16 gig. It's taking up the whole server. It says that only 10 mb are actually being used, so I should be able to shrink it, shouldn't I?

I tried to shrink it using Enterprise Manger and DBCC ShrinkDatabase. Nothing works. It just won't shrink it. It says that it has, but the numbers are still the same.

Is there anything I can do? What are my options here? We need that space on the server!!!

Thanks,
Drew
 

Shrinkdatabase should work. You can also try DBCC shrinkfile. If all else fails, stop and restart SQL Server. TempDB will be recreated with the default size. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Yeah, I tried the DBCC SHRINKFILE also, and that didn't change anything. Very weird. I thought maybe you just can't shrink tempdb. I tried it on a user created db, and it did work. It shrunk the database. So I dunno.

I'm gonna try to start and stop SQLServer and see if that works.

Thanks for the tip,
Drew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top