Re: onstat -g sql in 9.4
Posted in 2004
bothwellno@spam.duke.edu wrote:
> We use the output from onstat -g sql <sessid> to assist with
> problem resolution.
> The value of 'Last parsed SQL statement' is very helpful to find
> problematic SQLs.
>
> We are upgrading from 7.31 (AIX 4.3.2) to 9.40 (AIX 5.2) and have
> noticed that in version 9.40, the 'Last parsed SQL statement'
> section does not appear in the output of 'onstat -g sql' after
> the last SQL statement has been run. Here is an example:
>
> Type in:
>
> dbaccess stores7
>
> The choose 'Query -language', then 'New'. Type in the following query
> and then run it:
>
> close database;
> database stores7;
> select count(*) from items;>
> On another session, run 'onstat -g sql <sessid>'.
>
> Version 7.31.UD4 shows this:
>
> Informix Dynamic Server Version 7.31.UD4 -- On-Line -- Up 6 days
> 22:34:04 --
> 1212160 Kbytes
>
> Sess SQL Current Iso Lock SQL ISAM F.E.
> Id Stmt type Database Lvl Mode ERR ERR Vers
> 7289 - stores7 CR Not Wait 0 0 7.31
>
> Last parsed SQL statement :
> select count(*) from items>
> Version 9.40.UC2 shows this:
>
> IBM Informix Dynamic Server Version 9.40.UC2 -- On-Line -- Up 7 days
> 10:59:1
> 3 -- 1887040 Kbytes>
> Sess SQL Current Iso Lock SQL ISAM F.E.
> Id Stmt type Database Lvl Mode ERR ERR Vers
> Explain
>
> 32571 - stores7 NL Not Wait 0 0 9.03
> Off
>
>
> Any thoughts or ideas on this? I searched the release notes &
> documentation and did not find anything related to this. Is there
> a configuration parameter to enable this?
Thank you for providing details. That doesn't happen nearly often enough.
As to the change to 'onstat -g sql <sessionid>', there is a very brief
reference to the change, but the IDS Administrator's Reference for
Version 9.4 (Part No. CT1SYNA) doesn't give enough detail to say whether
the lost 'Last parsed SQL statement' was intentional or not. What the
manual *does* note is the addition of the 'Explain' column, and it
doesn't even highlight that addition. I noticed it by comparing the
Administrator's References for Versions 9.3 and 9.4. (BTW, the 'Last
parsed SQL statement' is included with IDS 9.20.UC3; I don't have 9.3x
to test, so I'd guess the change came with the addition of the 'Explain'
column in 9.4.)
I'd say I hope this helps you, but I know it doesn't. Have you checked
with anyone at IBM (Tech Support or Documentation) about this to find
out if the loss was intentional? Has anyone else responded with a
better answer?
--
June Hunt