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 slow statements


Lesson 1: Creating a diagnostic tracing session

Use the Database Tracing Wizard to create a diagnostic tracing session that captures processing statement data, including duration times.


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

This tutorial assumes that you have created the test database, app_profiling.db. See Tutorial: Creating a test database for the application profiling tutorials.

  1. Start Sybase Central. Click Start » Programs » SQL Anywhere 16 » Administration Tools » Sybase Central.

  2. In Sybase Central, connect to app_profiling.db as follows:

    1. Click Connections » Connect With SQL Anywhere 16.

    2. In the Connect window, complete the following fields to connect to the test database, app_profiling.db:

      1. In the Authentication field, type Database.

      2. In the User ID field, type DBA.

      3. In the Password field, type sql.

      4. In the Action dropdown list, select Start and connect to a database on this computer.

      5. In the Database file field, type C:\AppProfilingTutorial\app_profiling.db.

      6. In the Start Line field, type dbeng16 -x tcpip.

    3. Click Connect.

  3. In Sybase Central, click Mode » Application Profiling.

    If the Application Profiling Wizard appears, click Cancel.

  4. Start the Database Tracing Wizard as follows:

    1. Click File » Tracing.

    2. On the Welcome page, click Next.

    3. On the Tracing Detail Level page, click High detail (recommended for short-term, intensive monitoring), and then click Next.

    4. On the Edit Tracing Levels page, click Next.

    5. On the Create External Database page, click Do not create a new database. I will use an existing tracing database, and then click Next.

    6. On the Start Tracing page, click Save tracing data in this database.

    7. To place no limits on the amount of stored tracing data, click No limit, and then click Finish.

  5. In the left pane, ensure that app_profiling - DBA is selected, and then click File » Open Interactive SQL.

    Interactive SQL starts and connects to the app_profiling.db database.

  6. In Interactive SQL, execute the following SQL statement:

    SELECT SalesOrderItems.ID, LineID, ProductID, SalesOrderItems.Quantity, ShipDate
    FROM SalesOrderItems, SalesOrders
    WHERE SalesOrders.CustomerID = 105 AND 
  7. Exit Interactive SQL.

  8. In Sybase Central, select app_profiling - DBA in the left pane and click File » Tracing » Stop tracing with save to stop the tracing session.


You collected diagnostic information during a tracing session.

 See also