Lesson 1: Creating 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.

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

  2. Connect to app_profiling.db as follows:

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

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

      • 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. Click Connect.

  3. Start the Database Tracing Wizard as follows:

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

    2. Click File » Tracing.

    3. On the Welcome page, click Next.

    4. On the Tracing Detail Level page, click 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, click Do Not Create A New Database, and then click Next.

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

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

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

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

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

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

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

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

 See also