The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Here's a reproducible...

(1) Run the following query in dbisql:


(2) While the query is running, capture the LastStatement connection property value for the dbisql session:

select "COUNT_BIG"()
  from "SYSTAB" as "A"
    cross join "SYSTABCOL" as "B"
    cross join "SYSUSER" as "C"

(3) Immediately after the query has finished, capture the LastStatement value again.

In Version 16, LastStatement will still show the value in (2) above.

In Version 17, the following phantom query will appear, presumably issued by dbisql itself:

select "count"(distinct("creator" || '.' || "table_name")) from "sa_locks"("connection_property"('number')) where "table_name" <> 'EXCLUDEOBJECT'

This behavior is repetitive and annoying disruptive... how do I stop it?

Update: Sometimes, but not always, the following inexplicable lock shows up (can't use the adjective "phantom" because that's a real thing, whereas this lock should not exist)...

SELECT * FROM sa_locks();

asked 16 Nov '15, 15:39

Breck%20Carter's gravatar image

Breck Carter
accept rate: 21%

edited 16 Nov '15, 16:00

It's a feature Breck. See the new feature New visual indicator when database locks are present.

I unfortunately do not yet see a way to disable it (short of using dbisqlc or pre-V17 admin tools) and while it would appear to be randon it does appear to be executed only at times where it would matter (new connections, new tabs, DML operations, ... from my limited testing)


alt text

permanent link

answered 19 Nov '15, 18:25

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
accept rate: 30%


Would it not be more appropriate if such a "monitoring query" would run as a separate connection - thereby preventing the LastStatement connection property from becoming somewhat worthless?

(20 Nov '15, 05:56) Volker Barth

Adding an additional separate connection to dbisql for this was something I had thought of too ... [but I can think of lots of big solutions for small features all day long so the fact that I thought of that as well is not a very good measure of that being a good idea]

FWIW As a feature LastStatement may not represent what you are interested in for admin tools. Many [3rd party] dev. tools and admin tools will pepper the connection with lots of meta-queries like this. Specifically with dbisql, there are lots of other actions that occur in the background that can confound this feature in other ways.

Even outside of the dev. and admin tools the LastStatement property can became ineffective (for some purposes) for reasons other than just this (framework-, api-, metadata interaction) activity. Client side statement caching, long term multiple reuse of prepared statements, overlapping prepares and concurrent fetches across multiple cursors from same connections can all confound the meaning of this property. Maybe the better answer for all of this would be a much larger feature than just this one property.

But I'm sure none of this hasn't changed Breck's requirements or opinions much.



(20 Nov '15, 10:00) Nick Elson S...

OK, it's official... Watcom no longer does things the way they should be done. A sad day for all.

(20 Nov '15, 16:11) Breck Carter
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 16 Nov '15, 15:39

question was seen: 331 times

last updated: 20 Nov '15, 16:11