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 » Queries: Selecting Data from a Table » Query overview

Diagnostic tracing conditions Next Page

Determining current tracing settings


To see the current tracing settings, you start the Database Tracing wizard in Sybase Central. When you are done examining the settings, cancel the wizard. You can also retrieve the tracing settings in effect by querying the sa_diagnostic_tracing_level table.

You can retrieve tracing settings regardless of whether a tracing session is in progress.

To determine the current tracing settings (Sybase Central)
  1. Connect to the database as the DBA.

  2. Choose Mode > Application Profiling.

    If the Application Profiling wizard appears, click Cancel to close it.

  3. Right-click the database, and choose Tracing from the popup menu.

    If this is your first time using tracing, or if you have recently cleared your tracing settings, the Database Tracing wizard appears. Otherwise, you must choose Tracing > Configure and start tracing.

  4. Advance in the wizard until you reach the Edit Tracing Levels page. This page contains the settings currently specified for tracing, even if a tracing session is not in progress.

  5. Click Cancel to leave the wizard once you are done reviewing the settings.

To determine the current tracing settings (Interactive SQL)
  1. Connect to the database as the DBA.

  2. Query the sa_diagnostic_tracing_level table for rows in which the enabled column contains a 1.

    The database server returns the tracing settings currently in use. A 1 in the enabled column indicates that the setting is in effect.

  3. Example

    The following statement shows you how to query the sa_diagnostic_tracing_level diagnostic table to retrieve the current tracing settings:

    SELECT * FROM sa_diagnostic_tracing_level WHERE enabled = 1;

    The following table is an example result set from the query:

    idscopeidentifiertrace_typetrace_conditionvalueenabled
    1database(NULL)volatile_statisticssample_every1,0001
    2database(NULL)nonvolatile_statisticssample_every60.0001
    3database(NULL)connection_statistics(NULL)60,0001
    4database(NULL)blocking(NULL)(NULL)1
    5database(NULL)deadlock(NULL)(NULL)1
    6database(NULL)plans_with_statisticssample_every2,0001
    See also