Question

  Asked: Jul 18 2008   8:50 AM GMT
  Asked by: Sai


SQL Server


Windows XP, Visual Studio 2005, SQL Server 2005, TempDBs

What is a tempDB in SQL Server?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



Here is an excellent technet article that should give you all the information you are looking for.

----------

The basic summary of tempdb is that it's used for temporary objects. Temp tables, table variables, when SQL Server needs to stage data into a database for sorting data, doing joins in a hash table, etc it's all done within the tempdb database.

Each time the SQL Service is restarted the tempdb database is deleted and recreated as an empty database.
*****************************************************
TemDB in SQL Server is the area where all temporary information is stored. It consists of log files based on various transactions taking place in the database. Like MasterDB contains Master Database data, this contains temporary data. The log files need to be flushed on regular basis and don’t forget to Shrink TempDB to bring it back to actual size after flushing temp log files otherwise it will keep on utilizing the White Space.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Microsoft Windows, Development and SQL Server.

Looking for relevant Microsoft Windows Whitepapers? Visit the SearchEnterpriseDesktop.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Mrdenny  |   Jul 18 2008  5:58PM GMT

Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.