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


Creating an external tracing database

When you create a tracing session, you have the option of storing tracing data within the database being profiled. This is suitable for development environments where you are testing applications, or if there are few connections to the database. However, if your database typically handles 10 or more connections at any given time, it is recommended that you store tracing data in an external tracing database to reduce the impact on performance.

When you start a tracing session, use the Database Tracing Wizard to create an external tracing database. The Database Tracing Wizard unloads schema and permission information from the production database. You can use the tracing database to store data for subsequent tracing sessions. For information about creating a tracing session, see Create a diagnostic tracing session.

Use the Unload utility (dbunload) to manually create a tracing database without a tracing session.

 To create an external tracing database using the Unload utility (dbunload)
  1. Connect to the database as a user with DBA authority or as a user with PROFILE authority.

  2. Execute a dbunload command, similar to the following, to unload the schema from the production database into the new tracing database:

    dbunload -c "UID=DBA;PWD=sql;Server=demo;DBN=demo" -an tracing.db -n -k -kd

    This example creates a new database with the name supplied by the -an option (tracing.db). The -n option unloads the schema from the database being profiled (in this case, the SQL Anywhere sample database, demo.db) into the new tracing database. The -k option populates the tracing database with information that the application profiling tool uses to analyze the tracing data. The -kd option places all the dbspaces in a single dbspace file.

  3. If you want to store the tracing database on a separate computer, copy it to the new location.

 See also