
Find SQL query text on Sybase 11 ?
: We would like to know if we can find the text of the query SQL running on
: the system without buying specific monitoring products (i.e. using query on
: system table, keeping data from memory, .... ????).
Haved you checked out Sybase auditing? The capability comes with your
server; you just have to install the sybsecurity database (from sybinit).
You'll find a write-up on auditing in the Security Admin. Manual in
the System 11 documentation. I think it was in the System Admin. Manual
in the System 10 documentation.
Capturing SQL statements is done by auditing individual logins (e.g.,
sp_auditlogin username, "cmdtext", on ). This captures all SQL statements
for a particular user into the sysaudits table in sybsecurity. You can
then query that table and generate whatever reports you want/need.
Note, you would have to "cmdtext" captures SQL statements only -- not
stored procedure calls. You would audit stored procs separately.
Hope this helps
Teresa Larson
_________________________________________________________________
/ Teresa A. Larson http://www2.ari.net/jmasino/ /
/ Bell Atlantic Voice: (301) 282-0224 /
/ 13100 Columbia Pike, A-3-3 Fax: (301) 282-9416 /
/________________________________________________________________/
#include <std_disclaimer>