Search code examples
asp.netiissession-statesql-session-state

SQL Session State - Why does tempdb size grow out of control? How to prevent this?


We're currently using the tempdb to manage our SQL session state, but its size keeps growing out of control. Is there any way to manage or prevent this from happening?

We are thinking of setting up a custom database to manage SQL state instead of the tempdb, is this going to solve the problem?

Also, is there anything that we should be aware of when setting up and switching to a custom database?

Thanks.


Solution

  • Make sure that the SQL Server Agent is running. This is required to do clean up of the temp tables.

    http://support.microsoft.com/kb/317604