Trying to get logging/tracing of Sybase (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.

1 Answer 1


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.

  • 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. Commented Feb 18, 2012 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. Commented Feb 18, 2012 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
    Commented Jan 30, 2016 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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