on 2021 Jun 30 10:35 AM
A funny question!
Unfortunately we can't create a trigger which observes SELECTs on a table.
Has maybe someone an idea how can I log each query on each table in my DB? (the goal is for analysing an error in our application).
Request clarification before answering.
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 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at Auditing in the documentation - it might give you what you need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will not find any trigger-like features for SELECT statements, they don't exist, and they won't ever exist IMO.
I find only...
See Tutorial: Auditing in the SQL Anywhere Help.
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.
User | Count |
---|---|
68 | |
16 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.