sp_helpapptrace

Description

Determines which sessions Adaptive Server is tracing. sp_helpapptrace returns the server process IDs (spids) for all the sessions Adaptive Server is tracing, the spids of the sessions tracing them, and the name of the tracefile.

Syntax

sp_helpapptrace

Examples

Example 1

sp_helpapptrace
 traced_spid  tracer_spid    trace_file
-------------  ------------  ----------
11               exited      /tmp/myfile1
13               14          /tpcc/sybase.15_0/myfile2

Usage

sp_helpapptrace returns these columns:


Rebinding a trace

If a session is tracing another session, but quits without disabling the tracing, Adaptive Server allows a new session to rebind with the earlier trace. This means that a sa or sso is not required to finish every trace they start, but can start a trace session, quit, and then rebind to this trace session