SQL tempdb growth diagnose

preview_player
Показать описание
Detecting the file size of tempdb each minute using a SQL job to isolate the timing of growth and correlating to jobs running at the time.

Reduce file size:
DBCC SHRINKDATABASE(tempdb, 10);
DBCC SHRINKFILE(tempdev,0)

If the above doesn't work; try restarting SQL.
If again, it still doesn't work; restart SQL service and use startup parameter: -f

SQL to get tempdb file size:
SELECT GETDATE() dt, name,
file_id,
type_desc,
size * 8 / 1024 [TempdbSizeInMB]
ORDER BY type_desc DESC, file_id;

Diagnoses:
Large transaction size in performing updates to all records in a table.
Рекомендации по теме
Комментарии
Автор

not sure why we are looking at you, you're blocking the screens you keep opening

jeffhagstrom