Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

I'm trying to debug a web application (connected via ODBC).

Is there a way to log all queries received by the server?

asked 07 Dec '12, 03:38

MMacdonald's gravatar image

MMacdonald
1766617
accept rate: 0%

edited 15 Mar '13, 21:04

Mark%20Culp's gravatar image

Mark Culp
25.0k10142298


When using ODBC, I'd recommend to use the standard ODBC tracing, see the options in the ODBC admin dialog.

permanent link

answered 07 Dec '12, 04:13

Volker%20Barth's gravatar image

Volker Barth
40.5k365556827
accept rate: 34%

You can enable SQL Logging on the Server. You have to set a Log File and enable the Logging

call sa_server_option('Request_level_log_file', 'C:\temp\mylog.txt');
call sa_server_option('Request_level_logging', 'SQL');

If you have seen enough you can disable it

call sa_server_option('Request_level_logging', 'NONE');

Only Problem on a busy Server is that SQL from all Connections is written to the log file.

permanent link

answered 07 Dec '12, 06:05

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
2.7k293965
accept rate: 17%

1

AFAIK, you can also limit the request level logging for particular databases ("RequestFilterDB") and/or connections ("RequestFilterConn") - that may help on a busy server...

(07 Dec '12, 07:18) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×40
×11

question asked: 07 Dec '12, 03:38

question was seen: 2,480 times

last updated: 15 Mar '13, 21:04