Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Usage » Monitoring and Improving Database Performance » Application profiling tutorials » Tutorial: Diagnosing deadlocks


Lesson 4: Reviewing blocked connection data

The Application Profiling mode provides a graphical representation of the connections participating in the deadlock. It also provides a Connection Blocks tab that provides additional information on the blocked connections.

♦  To review blocked connection data
  1. Open the analysis file created during the tracing session.

    1. In Sybase Central, choose Application Profiling » Open Analysis File Or Connect To A Tracing Database.

    2. Select In A Tracing Database.

    3. Click Open.

    4. Click the Identification tab, and type DBA in the User ID field and sql in the Password field.

    5. Click the Database tab, and in the Database File field, browse to and select app_profiling - DBA.

    6. Click OK.

  2. View the graphical representation of the deadlock.

    1. In the Application Profiling Details pane click the Status tab and choose the most recent ID from the Logging Session ID list.

      If the Application Profiling Details pane does not appear, choose View » Application Profiling Details.

    2. At the bottom of the Application Profiling Details pane, click the Deadlocks tab. The most recent deadlock appears. Click the Deadlock list to view additional deadlocks.

    The following image shows how the UPDATE statements created a deadlock condition.

For each connection, a table is shown with a arrow pointing at the other connection.

Each connection involved in the deadlock is represented by a table with the following fields:

  • Connection Name   This field shows the user ID that opened the connection.

  • SQL Statement   This field shows the actual statement involved in the deadlock. In this case, the deadlock was caused by the UPDATE statements found in the procedures you executed from each instance of Interactive SQL.

  • Owning Connection ID   This field shows the ID of the connection that blocked the current connection.

  • Record ID   This field shows the ID of the row that the current connection is blocked on.

  • Rollback Operation Count   This field shows the number of operations that must be rolled back as a result of the deadlock. In this case, the procedures contained only the UPDATE statements, so the count is 0.