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 » Improving database performance » Advanced application profiling using diagnostic tracing


Create a diagnostic tracing session

When you start a diagnostic tracing session, you also configure the type of tracing you want to perform, and specify where you want the tracing data to be stored. Your tracing session continues until you explicitly request that it stops.

To start a tracing session, TCP/IP must be running on the database server(s) on which the tracing database and production database are running. See Using the TCP/IP protocol.


Starting a tracing session is also referred to as attaching tracing. Likewise, stopping a tracing session is referred to as detaching tracing. The SQL statements for starting and stopping tracing are, respectively, ATTACH TRACING and DETACH TRACING.

 To create a diagnostic tracing session (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA or PROFILE authority.

  2. Right-click the database and choose Tracing.

  3. Click Next.

  4. On the Tracing Detail Level page, select the level of tracing.

  5. On the Edit Tracing Levels page, customize the diagnostic tracing settings.

  6. On the Create External Database page:

    • Select Create A New Tracing Database.

    • Select a location to save the database.

    • Complete the User Name and Password fields.

    • Select Start Database On The Current Server.

    • Click Create Database.

  7. On the Start Tracing page:

    • Select Save Tracing Data In An External Database.

    • Complete the User Name and Password fields. Specify the user name and password used to connect to the production database.

    • In the Other Connection Parameters field, type the database server and database name in the form of a partial connect string. For example, Server=Server47;DBN=TracingDB


      Only DBN, DBF, Server, DBKEY, HOST, and LINKS (CommLinks) are supported in the connection string for an external database.

    • In the Do You Want To Limit The Volume Of Trace Data That Is Stored list, select an option.

  8. Click Finish.

  9. When you are done gathering diagnostic tracing data, right-click the database and choose Tracing » Stop Tracing With Save.

 To create a diagnostic tracing session (Interactive SQL)
  1. Connect to the database as the DBA, or as a user with PROFILE authority.

  2. Use the sa_set_tracing_level system procedure to set the tracing levels.

  3. Start tracing by executing an ATTACH TRACING statement.

  4. Stop tracing by executing a DETACH TRACING statement.

    You can view the diagnostic tracing data in Application Profiling mode in Sybase Central. See Application profiling.

 See also