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

truncating tempdb? 1

Status
Not open for further replies.

flstffatboy

Technical User
Sep 19, 2002
84
0
0
I'm new to SQL Server 2000 administration and had a problem yesterday where our tempdb grew to 25G which severely affected performance. Normally the tempdb isn't much larger than 1G. The actual user database is only 700M and SQL Server is shutdown on a nightly basis.

I know the tempdb is used for temporary tables and temporary working stroage area. I believe a user kicked off a query that looped and filled up the tempdb but I'm not 100% sure on this. Well the only thing I knew to do was to shutdown SQL Server and restart it which did shrink the tempdb and brought the performance of the system back to normal. Is there any other option I could have done besides shutting down and restarting?

Thanks in advance,
FLSTF
 
From enterprise Manager :

you can click on tempdb, right mouse click, select all tasks, select shrink database , set maximum free space in files to 0% and then hit ok.

If you want to do this from the Sql Query analyzer you can
type :

dbcc shrinkdatabase(tempdb) and then highlight and run



 
thank you Setsuna, your suggestion worked great in my situation as well. . .

-erwin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top