Hi,
Oracle associates sessions with statements for open cursors (V$OPEN_CURSOR), but also keeps track of the last and current SQL statement for each session (V$SESSION.SQL_ID and PREV_SQL_ID).
Here are a couple of queries you can try:
Session 1:
SQL> SELECT USERENV('SESSIONID') FROM dual;
USERENV('SESSIONID')
--------------------
97
Session 2:
SQL> SELECT sql_text AS "OPEN CURSORS"
2 FROM v_$open_cursor o, v_$session s
3 WHERE o.saddr = s.saddr
4 AND s.audsid = 97
5 /
OPEN CURSORS
------------------------------------------------------------
SELECT USERENV('SESSIONID') FROM dual
SQL> SELECT sql_text AS "LAST SQL EXECUTED"
2 FROM v$sqltext t, v$session s
2 WHERE s.audsid = 97
3 AND s.sql_id = t.sql_id
4 /
LAST SQL EXECUTED
----------------------------------------------------------------
SELECT USERENV('SESSIONID') FROM dual
Best regards.
Frank