Create user trace events to track information within your application.
Prérequis
You must have the MANAGE ANY TRACE SESSION and NOTIFY TRACE EVENT system privileges.
Create the required user trace event for your database.
For example:
CREATE TEMPORARY TRACE EVENT my_event( id INTEGER, information LONG VARCHAR ); |
You can create a stored procedure that runs when the database starts to create all required user trace events.
Execute a NOTIFY TRACE EVENT statement for each user-defined event that is being traced for the database.
For example:
NOTIFY TRACE EVENT my_event( 1, 'Hello world' ); |
The NOTIFY TRACE EVENT statement logs information about trace events to any trace session that is interested in the event. If an event is not defined when NOTIFY TRACE EVENT is executed, the database server generates an error. If an event does not exist, you can place the NOTIFY TRACE EVENT statement in a TRY block to define the behavior.
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |