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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Usage » Monitoring and Improving Performance » Advanced application profiling using diagnostic tracing

Advanced application profiling using diagnostic tracing Next Page

Tracing session data


Diagnostic tracing data is gathered during a tracing session. A tracing session can be captured in one of three ways:

  1. using the Database Tracing wizard in Sybase Central

  2. transparently, as part of the automated activities of the Application Profiling wizard

  3. using the ATTACH TRACING and DETACH TRACING statements

When a tracing session is in progress, SQL Anywhere generates diagnostic information for that database. The amount of tracing data generated depends on the tracing settings. For more information on how to configure the amount and type of tracing data generated, see Configuring diagnostic tracing.

The database being profiled is either referred to as the production database, the source database, or simply the database being profiled. The database into which the tracing data is stored is referred to as the tracing database. The production and tracing database can be the same database. However, storing tracing data in a separate database is recommended since doing so avoids growing the size of the production database. This is important since database files cannot be reduced to a smaller size once they have grown. Also, the production database performs better if the overhead for storing and maintaining tracing data is performed in another database, especially if the production database is large and experiences heavy usage.

Note

When you create a tracing session for a database running on Windows CE, you must use the Database Tracing wizard (you cannot use the Application Profiling wizard). As well, you must trace from the Windows CE device to a copy of the Windows CE database running on a database server on a desktop computer. You cannot automatically create a tracing database from a Windows CE device, and you cannot trace to the local database on a Windows CE device.

The tables that hold the tracing data are referred to as the diagnostic tracing tables. These tables are owned by dbo. For more information on these tables, see Diagnostic tracing tables.

Files created during a tracing session

The files created and used for a tracing session differ, depending on whether you use the Application Profiling wizard, or the Database Tracing wizard.

When you run the Application Profiling wizard, the wizard silently captures a tracing session behind the scenes, creating a tracing database to hold the diagnostic tables. This external database is created using the name and location you specify in the wizard, and it has the extension .adb. The wizard also creates an analysis log file in the same directory as the tracing database, using same name but with the extension .alg. This analysis log file contains the results of the analysis work done by the wizard, and can be opened at any time in a text editor.

Once you are done with the recommendations provided by the Application Profiling wizard, you can delete the tracing database and analysis log file associated with the session.

When you create a tracing session using the Database Tracing wizard, the wizard asks you choose whether to save tracing data in the production (local) database, or in an external tracing database (recommended). You are also given an opportunity to create an external tracing database, if you do not already have one, using the wizard. An external tracing database has the extension .db.

For information on how to create an external tracing database, see Creating a separate tracing database.