Use the Database Tracing Wizard to create a diagnostic tracing session that captures processing statement data, including duration times.
Prerequisites
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.
Start Sybase Central. Click Start » Programs » SQL Anywhere 16 » Administration Tools » Sybase Central.
In Sybase Central, connect to app_profiling.db as follows:
Click Connections » Connect With SQL Anywhere 16.
In the Connect window, complete the following fields to connect to the test database, app_profiling.db:
In the Authentication field, type Database.
In the User ID field, type DBA.
In the Password field, type sql.
In the Action dropdown list, select Start and connect to a database on this computer.
In the Database file field, type C:\AppProfilingTutorial\app_profiling.db.
In the Start Line field, type dbeng16 -x tcpip.
Click Connect.
In Sybase Central, click Mode » Application Profiling.
If the Application Profiling Wizard appears, click Cancel.
Start the Database Tracing Wizard as follows:
Click File » Tracing.
On the Welcome page, click Next.
On the Tracing Detail Level page, click High detail (recommended for short-term, intensive monitoring), and then click Next.
On the Edit Tracing Levels page, click Next.
On the Create External Database page, click Do not create a new database. I will use an existing tracing database, and then click Next.
On the Start Tracing page, click Save tracing data in this database.
To place no limits on the amount of stored tracing data, click No limit, and then click Finish.
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.
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; |
Exit Interactive SQL.
In Sybase Central, select app_profiling - DBA in the left pane and click File » Tracing » Stop tracing with save to stop the tracing session.
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |