Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Hi,
is there a table in sysmaster that will catch the query that has been running
just before the current query ?
I would like to query the last query that has been running for MY session (i.e
this query must run in the same session), but syssqlstat, but if I run such
query, the query returned is the query that queries on syssqlstat, not the
query from the application .... endless story.
Is there any other way to catch what I want?
I don't wanna use sqltrace.
Hi Eric.
If that app is running prepared statements, you should be probably able to see
something in sysconblock.
Have you tried?
HTH
Best regards
Alexandre Marini
Good idea Alex, but I do not control if the queries are prepared or not
the question is:
how does onstat -g ses sesnumber do to catch the current query and the last
parsed query?
The info should be somewhere ???
Hi Eric.
Please take a look at syssqlcurses.
It is a view based on some tables, documentation says
{ SQL Current session }
I tried here, even for unprepared statements, and it seems pretty complete.
See if it helps.
Best regards.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.