The output of the onstat -g sql command
contains statistics on the SQL statements executed by the session
To obtain information about the last SQL statement
that each session executed, issue the onstat -g sql command
with the appropriate session ID.
onstat
-g sql output shows sample
output for this option using the same session ID obtained from the
onstat
-u sample in
Obtaining session-id for userthread
in onstat -x .