Answer the question
In order to leave comments, you need to log in
Tempdb is growing - why?
There is a sql server that has a job, it runs every 10 seconds, does not add anything to the database, but only communicates with the linked server via odbc. The procedure uses global temporary tables, which are immediately dropped at the end of the procedure. Moreover, the cat wept for the data in these temporary tables, 3-5 lines in a table of 10 columns. Those. the procedure started, pulled out 10 rows from one server into a temporary table, sent it to another server, dropped the table, and so on.
Tempdb is growing at about 70 MB per hour, and disk space is constantly decreasing. You have to restart sql server to free up space.
Can anyone explain why it keeps growing?
I couldn't find anything obvious in the documentation.
Answer the question
In order to leave comments, you need to log in
quote:
Running out of disk space for the tempdb database can cause significant crashes in the SQL Server production environment and prevent running applications from completing operations. You can use the sys.dm_db_file_space_usage dynamic management view to control the disk space used by specified functions in the tempdb database files. You can also use the sys dynamic management views to control page allocation and deallocation activity in the tempdb database at the session or task level. dm_db_session_space_usage and sys.dm_db_task_space_usage. These views can be used to define large queries, temporary tables, or table variables that use a lot of tempdb's disk space. There are also several corresponding counters, which can be used to track free space in tempdb and resources using tempdb. For more information, see Troubleshooting Out of Disk Space for the tempdb Database.
Check that you really use tempdb. And do not forget that it is not necessary to restart the service when you can shrink the database using the scheduler.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question