Unexpected growth of tempdb

Unexpected growth of tempdb

Hello, we had yesterday an unexpected super growth of tempdb database....
The tempdb started growing from <100MB to 70GB. Then the disk was full.
We are still investigating what could be the cause and there is NO suspect that could be OutSystems (the SQL server is shared with OutSystems and many other systems).
Nevertheless I would like to ask if somebody had this situation and what caused it... is there a chance that could be an OutSystems application? How can I check this and be sure that was not our applications?
Thank you for your help!
Hi Carolina,

The tempdb can grow either due to tables created explicitly or to temporary tables that are created and managed entirely by SQL Server. This means that if you have a query which performs an aggregation or some JOIN operation that will produce a lot of data, the tempdb can be used to store intermediate results.

This means that depending on the size of your data and the type of queries you are performing, the growth in tempdb can come from an application created in OutSystems or from any other system, as the tempdb is shared for the whole SQL Server instance.

In order to identify which application using the database is causing your problem, I suggest looking into these metadata views: sys.dm_db_task_space_usage, sys.dm_db_session_space_usage and sys.dm_db_file_space_usage, which used together with the SQL Server Profiler may provide you with a hint of where the problem is coming from.

For more queries useful in troubleshooting tempdb growth, see also Troubleshooting Insufficient Disk Space in tempdb.

I hope this helps!