December 6, 2018 at 1:29 am
Hi All
To track down what is causing TempDB to fill up now is something that is done often so that's pretty straight forward.
Can anyone assist me in finding out how to track down which queries filled up or used TempDB significantly in the past?
Will the plan cache be of assistance here? If so, how would I get this kind of information?
Thanks
December 6, 2018 at 4:30 am
Sicilian-Najdorf - Thursday, December 6, 2018 1:29 AMHi All
To track down what is causing TempDB to fill up now is something that is done often so that's pretty straight forward.
Can anyone assist me in finding out how to track down which queries filled up or used TempDB significantly in the past?
Will the plan cache be of assistance here? If so, how would I get this kind of information?Thanks
You can check and try this https://www.sqlserverblogforum.com/dba/tempdb-database-is-full/
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
December 6, 2018 at 4:40 am
SELECT TE.name AS [EventName] ,
T.DatabaseName ,
t.DatabaseID ,
t.NTDomainName ,
t.ApplicationName ,
t.LoginName ,
t.SPID ,
t.Duration ,
t.StartTime ,
t.EndTime,
planhandle,
sqlhandle
FROM sys.fn_trace_gettable(CONVERT(VARCHAR(150), ( SELECT TOP 1
f.[value]
FROM sys.fn_trace_getinfo(NULL) f
WHERE f.property = 2
)), DEFAULT) T
JOIN sys.trace_events TE ON T.EventClass = TE.trace_event_id
WHERE databasename = 'tempdb' and te.name = 'Data File Auto Grow'
OR te.name = 'Data File Auto Shrink'
ORDER BY t.StartTime ;
Use the default Trace.
December 6, 2018 at 7:51 am
I find that if it's actually to be found in the default trace, you got damned lucky. Most default traces get full and rollover very quickly on busy systems.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply