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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Performance improvements, diagnostics, and monitoring » Application profiling tutorials » Tutorial: Diagnosing deadlocks


Lesson 3: Reviewing blocked connection data

Use Application Profiling mode to view a graphical representation of the connections participating in the deadlock. Application Profiling mode also provides a Connection Blocks tab that provides additional information about the blocked connections.


This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Diagnosing deadlocks.

This lesson assumes that you have completed all preceding lessons. See Lesson 1: Setting up the database.

  1. Open the analysis file created during the tracing session as follows:

    1. In Sybase Central, click Application Profiling » Open Analysis File or Connect to a Tracing Database.

    2. Click In a tracing database.

    3. Click Open.

    4. In the User ID field, type DBA.

    5. In the Password field, type sql.

    6. In the Action dropdown list, click Connect to a running database on this computer.

    7. In the Database name field, type app_profiling.

    8. Click Connect.

  2. View the graphical representation of the deadlock as follows:

    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, click 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.

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

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

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

    • Connection name   The user ID that opened the connection.

    • SQL statement   The statement involved in the deadlock. In this case, the deadlock was caused by the UPDATE statements that are found in the procedures you executed from each instance of Interactive SQL.

    • Owning connection ID   The ID of the connection that blocked the current connection.

    • Record ID   The ID of the row that the current connection is blocked on.

    • Rollback operation count   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.

  3. To view additional deadlock information, such as how often they occur and how long they last, use the Connection Blocks tab as follows:

    1. In the Application Profiling Details pane, click the Database Tracing Data tab.

    2. Click the Connection Blocks tab, just above the Database Tracing Data tab.

      The Connection Blocks tab appears, displaying the block time, unblock time, and duration of each blocked connection.


You have completed the application profiling tutorial on diagnosing deadlocks.

 See also