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

CREATE TEMPORARY TRACE EVENT statement

Creates a user trace event that persists until the database is stopped.

Syntax
CREATE [ OR REPLACE ] TEMPORARY TRACE EVENT trace-event-name 
[ WITH SEVERITY {
 0-255
 | ALWAYS
 | CRITICAL
 | ERROR
 | WARNING
 | INFORMATION
 | DEBUG } ]
[ ( field-name field-type [ , ... ] ] )
Parameters
  • trace-event-name

    Specify a user trace event name. User trace event names cannot start with the prefix SYS_. System trace event names cannot be specified.

  • OR REPLACE clause

    Create a new trace event, or replace an existing trace event with the same name.

  • WITH SEVERITY clause

    If the severity level is not specified, the default severity level (DEBUG) is used. User trace events are owned by the database that the user was connected to when the trace event was created. The supported severity values are:

    Level Severity value range
    ALWAYS 0
    CRITICAL 1-50
    ERROR 51-100
    WARNING 101-150
    INFORMATION 151-200
    DEBUG 201-255
  • field-name

    The field that gathers information of a specific type from the user trace event. The field must be a valid identifier.

  • field-type

    You can use any data type that is supported for a column except an array type.

Remarks

A trace event is stored in memory and is dropped when the database server stops if it has not been dropped explicitly.

System privileges

You must have the MANAGE ANY TRACE SESSION system privilege.

Side effects

None

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

The following statement creates a user trace event:

CREATE TEMPORARY TRACE EVENT my_event( id INTEGER, information LONG VARCHAR );