SQL Trace Analysis
SELECT * Into sample
From tn_trace_gettable (' c:\sample\a.trc ', default)
where Eventcalss in (10, 12)
--10:rpc:completed is sent when a remote procedure call (RPC) is completed. Typically, some stored procedure calls.
--12:sql:batchcompleted occurs when a Transact-SQL batch is completed.
(1), to find out which application on the client server sent the statement from the overall database caused by the "read" up to:
Select DatabaseId, HostName, ApplicationName, sum (reads)
From sample
Group by DatabaseId, HostName, ApplicationName
ORDER by sum (reads) desc
With this result, you probably know which clients have access to a large number of data pages, which can cause memory pressure
(2), install reads from large to small sort the maximum of 1000 statements:
Select Top TextData, DatabaseId, HostName, ApplicationName, LoginName, SPID,
Starttime, EndTime, Duration, reads, writes, CPU
From sample
ORDER BY reads Desc
SQL Trace Analysis