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!

tempdb database HUGE

Status
Not open for further replies.

phil22046

Programmer
Sep 12, 2001
154
US
I was doing a routine inspection of my sql server machine and found that the tempdb database has grown to the point of nearly filling the Hard drive. I don't know what size it should be, but the last date on it is June 5th, 2007. it is 53 Gigabytes and the largest database is 24 gigabytes.

I don't remember what it is used for. And I am not sure what to do to fix the problem.
 
You could truncate the log and shrink the file, but the easiest way to clear the tempdb is to schedule a downtime and stop and start the SQL Server services. That will rebuild the tempdb to the size of the model database.

-SQLBill

Posting advice: FAQ481-4875
 
The tempdb database is a system database that contains temporary tables created by the server and by the user. The database is recreated each time SQL server is restarted. If it has grown to such a large size it is because at some point the system must have needed the space. You may want to consider placing it on another array. This will increase performance and help with disk space.

See the following link for more details.


- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
How would I put this database on another Array? We have various sans drives available that have tera-bytes of free space. We have drive letter mappings to these areas.
 
Use the ALTER database statement as outlined in the link that is posted above. But you can not move the tempdb to a mapped drive it must be assigned to the server.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top