Today, I’ve been checking if there are any videos on YouTube on Sybase ASE’s dbcc traceon usage and I’ve found this interesting video by Lester Leonares about a nice functionality to log user activity to a file:
(This video is a part of the SAP D&T Academy, definitely worth checking out.)
Below are some notes from the video and the white paper.
To enable tracing:
set tracefile "<file-path>" [for <spid>]
To disable tracing:
set tracefile off [for <spid>]
The “set” commands in ASE whose output can be traced under application tracing context are:
set show_sqltext <on/off>
set showplan <on/off>
set statistics io <on/off>
set statistics time <on/off>
set statistics plancost <on/off>
-- and all ‘set option’ subcommands