Trying to trouble shoot some problems with long running queries. The Sql Monitor prompts me that I have a query that has exceeded the threshold, but 9 out of 10 times it has null for the query.
Example Problem: A query has been running longer than the 20 s threshold. A query issued by connection 'App1' (ID 31,399) has been running for 156 s. The query is as follows: null Advice: Try closing the connection that issued this query. Check the query to make sure that it is not unnecessarily costly (for example,
I am running sql monitor version 220.127.116.114 against a 10.x Sql Anywhere server and database. Is the null caused by the version mismatch, is there a length limitation on what the sql in the query can be to be returned in the error message, or am I missing a setting somewhere ...
asked 06 Jul '11, 11:22
You must use the server option '-zl' or set the server option 'RememberLastStatement' first or the alert will not show the last query executed.
answered 06 Jul '11, 14:29
Check out Foxhound.
FWIW the "RememberLastStatement" setting is also required with Foxhound: Question: How do I get something to show up in the Last Statement column?
answered 07 Jul '11, 06:58