Question of the Day Fifteen
What is the function of the tempdb database (given the last three posts, did you really think we would leave out the last system database)?
The tempdb database stores global and local temporary tables as well as temporary stored procedures, table variables, and cursors (unfortunately). It also contains internal objects used for spools and sorting. Tempdb is recreated every single time that the instance is restarted making it unique among the system databases. Nothing is ever saved from one session to another hence the moniker, temporary database.