patternsqlMinor
Diagnose slow SQL in SQL Server
Viewed 0 times
sqldiagnoseslowserver
Problem
I am not a DBA so please be patient with me...
Is it possible to turn on a trace on SQL Server which will tell me any SQL statement that takes longer than 2 seconds to execute, when it happened and what the SQL was? Is it possible to set the time to 2, 3 , 4 , whatever... ?
Thanks
Is it possible to turn on a trace on SQL Server which will tell me any SQL statement that takes longer than 2 seconds to execute, when it happened and what the SQL was? Is it possible to set the time to 2, 3 , 4 , whatever... ?
Thanks
Solution
Yes.
In SQL Server Profiler, you can filter on "Duration"
(This is from the "Standard (default)" template on SQL Server 2012 RC0 Profiler)
In SQL Server Profiler, you can filter on "Duration"
(This is from the "Standard (default)" template on SQL Server 2012 RC0 Profiler)
Context
StackExchange Database Administrators Q#14536, answer score: 6
Revisions (0)
No revisions yet.