cancel
Showing results for 
Search instead for 
Did you mean: 

Sql Anywhere Monitor

Former Member
3,488

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 11.0.1.2044 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 ...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

You must use the server option '-zl' or set the server option 'RememberLastStatement' first or the alert will not show the last query executed.

Former Member
0 Kudos

Thanks Paul I will give this a try.

Former Member
0 Kudos

Ok Paul, four out of five messages have had the sql in them now. Not sure why the fifth one did not, but it is a big improvement. Thanks for the -zl tip.

Former Member
0 Kudos

BTW, the latest EBF contains a better alert message that tells you to turn on that option.

Breck_Carter
Participant

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?

0 Kudos

Which (in the interest of openness) is Breck's own (great) product.