I got some problems with my SQL Server. Some external queries write into the Temp db and every 2-3 days it is full and we have to restart the SQL database. I got who is active on it. And also we can check monitor it over grafana. So I get a exact time when the query starts to write a lot of data into the temp db. Can someone give me a tip on how I can search for the user when I get the exact time?
select top 40 User_Account, start_date, tempdb_allocations
from Whoisactive
order by tempdb_allocation, desc
where start_date between ('15-02-2023 14:12:14.13' and '15-02-2023 15:12:14.13')
| User_Account | Start_Date | tempdb_allocations |
|---|---|---|
| kkarla1 | 15-02-2023 14:12:14.13 | 12 |
| bbert2 | 11-02-2023 12:12:14.13 | 0 |
| ubert5 | 15-02-2023 15:12:14.13 | 888889 |
sql_textcolumn in your query to see what is the query or stored procedure used, and ask to the user or team to improve the query and to delete the temporary table after finishing the procedure