You need to identify which queries are taking longer than 1 second to run over an extended period of time

You administer a Microsoft SQL Server 2012 server. One of the databases on the server supports a
highly active OLTP application.
Users report abnormally long wait times when they submit data into the application.
You need to identify which queries are taking longer than 1 second to run over an extended period
of time.
What should you do?

You administer a Microsoft SQL Server 2012 server. One of the databases on the server supports a
highly active OLTP application.
Users report abnormally long wait times when they submit data into the application.
You need to identify which queries are taking longer than 1 second to run over an extended period
of time.
What should you do?

A.
use SQL Profiler to trace all queries that are processing on the server. Filter queries that have a
Duration value of more than 1,000.

B.
Use sp_configure to set a value for blocked process threshold. Create an extended event session.

C.
Use the Job Activity monitor to review all processes that are actively running. Review the Job
History to find out the duration of each step.

D.
Run the sp_who command from a query window.

E.
Run the DBCC TRACEON 1222 command from a query window and review the SQL Server event
log.

Explanation:
http://www.mssqltips.com/sqlservertip/2130/finding-sql-server-deadlocks-using-trace-flag-1222/
http://msdn.microsoft.com/en-us/library/ms188396.aspx



Leave a Reply 7

Your email address will not be published. Required fields are marked *


Henro

Henro

I do agree with Shak. Looking at the description of traceflag 1222 it seems that it is assumed that a query running longer then 1 sec is involved in a deadlock. While there can be many many more reasons wy a query is taking more then 1 sec.

1222
Returns the resources and types of locks that are participating in a deadlock and also the current command affected, in an XML format that does not comply with any XSD schema.
Scope: global only

starter

starter

The Extended Events profiler is integrated directly into SQL Server Management Studio and can capture Database Engine activity similar to the way SQL Server Profiler is used.
SQL Server Profiler is a graphical tool, and it is important to realize that it can have significant performance impact on the server being traced.