cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

Need a tempdb alert for actual space used

Hi,

I need an alert that sends a message when the actual tempdb usage is 80%. Our tempdb is pre-sized but I need to know when it close to filling up.

0 Kudos
1 Reply
Level 14

You might try something simple like:

select (size/maxsize)*100

from sys.sysfiles

where fileid = (select file_id from sys.dm_io_virtual_file_stats where database_name = 'tempdb')

Make that into a custom alert with a single value and set thresholds at 80 and perhaps 90 percent?

0 Kudos