2

Trying to get logging/tracing of Sybase 9.0.2.3396 (Adaptive Server Anywhere). I wish to log all the SQL executed against the database.

I tried RIBO and while I got it "working," I never saw anything captured. Port 5003 for listen, server: localhost, and Server Port 2638.

I also tried ODBC tracing on WinXP but with limited success. I got some "connection information" but never any actual transaction tracing.

2

Take a look at the -zr switch on the server, which turns on "request level logging". Start the server with -zr all -zo reqlog.txt and then look at reqlog.txt after some queries have been executed. It's fairly verbose but should list the SQL that's being executed.

Disclaimer: I work for Sybase in SQL Anywhere engineering.

3
  • Thanks for the idea Graeme, but we're using the -hv flag so we can run as a service. Without the flag it works. I'm currently focused on trick 2 but logging isn't working when run as a service. – Mark Gerrior Feb 18 '12 at 3:20
  • That's odd, running as a service should not affect whether request level logging works. Could be a permission problem creating the reqlog.txt file. Note also that 9.0.2 is very old. The most recent version is 12.0.1. In understand that in some cases it's not possible to upgrade but if you can, you probably should. – Graeme Perrow Feb 18 '12 at 13:21
  • the "-zr all -zo reqlog.txt" works even with "-hv" option. the trick is not the add "-zr .." after "-hv" option but to look into registry under HKLM\System\CurrentControlSet\services and to find your service. For ASA server with "-hv" there's a sub-key called Parameters. Append the "-zr ..." option here and you're done. – rezna Jan 30 '16 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.