Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

asked 06 Jul '11, 11:22

trexco's gravatar image

trexco
336111423
accept rate: 0%


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

permanent link

answered 06 Jul '11, 14:29

PaulTonizzo%20%20SA%20tools's gravatar image

PaulTonizzo ...
516310
accept rate: 31%

Thanks Paul I will give this a try.

(06 Jul '11, 15:32) trexco

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.

(06 Jul '11, 16:28) trexco

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

(06 Jul '11, 16:39) PaulTonizzo ...

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?

permanent link

answered 07 Jul '11, 06:58

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

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

(08 Jul '11, 15:07) Daz Liquid
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:

×32

question asked: 06 Jul '11, 11:22

question was seen: 3,146 times

last updated: 08 Jul '11, 15:07