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

SQL Anywhere 12.0.0 » SQL Anywhere Server - SQL Usage » Monitoring and improving database performance » Application profiling tutorials » Tutorial: Diagnosing slow statements


Lesson 1: Create a diagnostic tracing session

The Database Tracing Wizard is used to create a diagnostic tracing session. The tracing session captures processing statement data which includes duration times.

 To create a diagnostic tracing session
  1. This tutorial assumes you have created the test database, app_profiling.db, required for the application profiling tutorials. If you have not, see Create a test database for the application profiling tutorials.

  2. Connect to app_profiling.db as follows:

    1. In Sybase Central, in the SQL Anywhere 12 plug-in, choose Connections » Connect With SQL Anywhere 12.

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

      • Authentication   Database

      • User ID    DBA

      • Password    sql

      • Action   Start A Database On This Computer

      • Database File   C:\AppProfilingTutorial\app_profiling.db

      • Start Line   dbeng12 -x tcpip

  3. Start the Database Tracing Wizard as follows:

    1. In Sybase Central, choose Mode » Application Profiling. If the Application Profiling Wizard appears, click Cancel.

    2. Choose File » Tracing » Configure And Start Tracing.

    3. On the Welcome page, click Next.

    4. On the Tracing Detail Level page, select High Detail (Recommended For Short-Term, Intensive Monitoring), and then click Next.

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

    6. On the Create External Database page, select Do Not Create A New Database, and then click Next.

    7. On the Start Tracing page, select Save Tracing Data In This Database.

    8. To allow no limits on the amount of stored tracing data, select No Limit, and then click Finish.

  4. In the left pane, click app_profiling - DBA, and then choose File » Open Interactive SQL.

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

  5. In Interactive SQL, run the following SQL statement.

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

  7. To stop the tracing session, in Sybase Central click app_profiling - DBA and choose File » Tracing » Stop Tracing With Save.

  8. Click this link to continue the tutorial: Lesson 2: Review statements processed by the database server.

 See also