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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Reference » System Objects » Tables » Diagnostic tracing tables

 

sa_diagnostic_request table

The sa_diagnostic_request table is owned by the dbo user, and is the master table for all requests. A request is an event related to query processing and generally includes:

  • connect or disconnect events

  • statement executions

  • statement preparations

  • open or drop cursor events

There are two versions of this table: sa_diagnostic_request and sa_tmp_diagnostic_request.

Columns
Column name Column type Column constraint Table constraints
logging_session_id UNSIGNED INT NOT NULL

Primary key.

Foreign key references sa_diagnostic_connection.

Foreign key references sa_diagnostic_cursor.

Foreign key references sa_diagnostic_query.

Foreign key references sa_diagnostic_statement.

request_id UNSIGNED BIGINT NOT NULL Primary key.
start_time TIMESTAMP NOT NULL
finish_time TIMESTAMP NOT NULL
duration_ms UNSIGNED INT NOT NULL
connection_number UNSIGNED INT

Foreign key references sa_diagnostic_connection.

request_type UNSIGNED SMALLINT
statement_id UNSIGNED BIGINT

Foreign key references sa_diagnostic_statement.

query_id UNSIGNED BIGINT

Foreign key references sa_diagnostic_query.

cursor_id UNSIGNED BIGINT

Foreign key references sa_diagnostic_cursor.

sql_code SMALLINT

logging_session_id   The logging session during which the request occurred.

request_id   A number uniquely identifying the request.

start_time   The time at which the event started.

finish_time   For statement execution, the time when the statement completed; otherwise, NULL.

duration_ms   The duration of the event in milliseconds.

connection_number   The ID of the connection that caused the event to happen.

request_type   The type of request. Values include:

Value Description
1 Start of new tracing session
2 Statement execution
3 Cursor open
4 Cursor close
5 Connect
6 Disconnect

statement_id   If the event was statement-related, the ID assigned to the statement for tracing purposes.

query_id   If the event was query-related, the ID assigned to the query for tracing purposes.

cursor_id   If the event was cursor-related, the ID assigned to the cursor for tracing purposes.

sql_code   Since rows in this table represent operations on statements, cursors, or queries, most return a SQL code. This column contains the SQL code returned. If a SQL code of 0 is returned, the column contains NULL.