Display information about session SQL statements

Use the onstat -g sql session-id or onstat -g spf commands to display information about the SQL statements executed by a session.

The following figure shows that onstat -g sql session-id displays the same information as the bottom portion of the onstat -g ses session-id command in onstat -g ses session-id output , which includes the number of bytes allocated from the sscpool.
Figure 1: onstat -g sql session-id output
onstat -g sql 14


Sess  SQL            Current            Iso Lock       SQL  ISAM F.E.
Id    Stmt type      Database           Lvl Mode       ERR  ERR  Vers
14    SELECT         vjp_stores         CR  Not Wait   0    0    9.03

Current statement name : slctcur

Current SQL statement :
  SELECT C.customer_num, O.order_num FROM customer C, orders O, items I
    WHERE C.customer_num = O.customer_num AND O.order_num = I.order_num

Last parsed SQL statement :
  SELECT C.customer_num, O.order_num FROM customer C, orders O, items I
    WHERE C.customer_num = O.customer_num AND O.order_num = I.order_num

11600 byte(s) of memory is allocated from the sscpool