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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » Database maintenance » Event tracing

 

Creating a trace session

Create a trace session that can record event tracing information to the diagnostic log.

Prérequis

You must have the MANAGE ANY TRACE SESSION system privilege.

Any user trace events that are referenced in NOTIFY TRACE EVENT statements for the database must exist, unless the NOTIFY TRACE EVENT statement is contained in a TRY block that handles any errors if the user trace event does not exist. See Creating a user trace event.

 Task
  • Execute a CREATE TEMPORARY TRACE EVENT SESSION statement.

    For example:

    CREATE TEMPORARY TRACE EVENT SESSION my_session
        ADD TRACE EVENT my_event, -- user event
        ADD TRACE EVENT SYS_ConsoleLog_Information -- system event
        ADD TARGET FILE ( SET filename_prefix='my_trace_file' );

    The ADD TRACE EVENT clauses specify user and system trace events that are part of the session. The ADD TARGET FILE clause specifies the name of the logging target and, optionally, any parameters associated with that target.

Résultat

The trace session is created for the database, but it must be started manually.

Suivant

Start the trace session for the database.

 See also