Request-level logging is (apparently) described in two places... See also the Tracing tab in the ODBC Data Source Administrator. Be careful, however, to turn the trace off when you're done, otherwise you'll fill up the disk :) answered 30 Jun '21, 10:54 Breck Carter |
Have a look at Auditing in the documentation - it might give you what you need. answered 30 Jun '21, 10:26 Justin Willey I find only these 2 procedures: sa_disable_auditing_type sa_enable_auditing_type But how can I log all SELECTs on a specific Table?
(30 Jun '21, 10:49)
Baron
Replies hidden
1
You will not find any trigger-like features for SELECT statements, they don't exist, and they won't ever exist IMO.
(30 Jun '21, 10:56)
Breck Carter
I don't think that any of the options let you specify particular tables for auditing or request logging.
(30 Jun '21, 10:57)
Justin Willey
Comment Text Removed
See Tutorial: Auditing in the SQL Anywhere Help.
(30 Jun '21, 11:00)
Breck Carter
Ok, what should then I understand from the answer:
(30 Jun '21, 11:06)
Baron
Replies hidden
1
Just what it says. You asked how to "log each query on each table in my DB?" - that's one of the things auditing can do. It records queries in the transaction log. Whether it does it in a way that is useful to you, only you can decide.
(30 Jun '21, 11:16)
Justin Willey
But according to the tutorial (so far as I understood), auditing logs any violation in the transaction log (i.e. it logs a failed attempt to query a table), but it doesn't log successfull queries on the same table.
(01 Jul '21, 03:40)
Baron
Just try the sample when using a user with according permission to do the sample select, e.g. the user "BROWSER" (password "browse" according to the docs), and check what the log reveals. (FWIW, I added a comment to your question, just in case...)
(01 Jul '21, 04:10)
Volker Barth
|
If you tell what kind of error you are trying to diagnose, we might provide more specific help, as the suggested RLL, ODBC tracing and auditing facilities seem all helpful - but possible much too general for your issue (aka too much noise around the signal)...