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

SQL Anywhere 17 » SQL Anywhere Server - SQL Reference » SQL statements » Alphabetical list of SQL statements

DETACH TRACING statement (deprecated)

The diagnostic tracing feature is deprecated. Use the SQL Anywhere Profiler to diagnose issues in your database. The DETACH TRACING session ends a diagnostic tracing session.

  • WITH SAVE clause

    Specify WITH SAVE to save unsaved diagnostic data in the diagnostic tables.

  • WITHOUT SAVE clause

    Specify WITHOUT SAVE if you do not want to save unsaved tracing data.


Execute this statement from the database being profiled to stop sending diagnostic information to the diagnostic tables. If you specify the WITHOUT SAVE clause, then you can still save the data later, assuming that the tracing database is still running and another tracing session has not been started, by using the sa_save_trace_data system procedure.

To see the current tracing levels set for a database, look in the sa_diagnostic_tracing_level table.

Note Tracing information is not unloaded as part of a database unload or reload operation. To transfer tracing information from one database to another, you must do so manually by copying the contents of the sa_diagnostic_* tables; however, this is not recommended.

You must have the MANAGE PROFILING system privilege.

Side effects


  • ANSI/ISO SQL Standard

    Not in the standard.