This query can be used to get session info as well as the current and previously cached SQL executed in a given session. You will need to add a where clause relevant to what you are looking for. I generally use the osuser or username values.
A.NAME AS SQL_ACTION,
S.SQL_FULLTEXT AS SQL_TEXT,
S.ROWS_PROCESSED AS SQL_ROWS_PROCESSED,
PA.NAME AS PREV_SQL_ACTION,
PS.SQL_FULLTEXT AS PREV_SQL_TEXT,
PS.ROWS_PROCESSED AS PREV_SQL_ROWS_PROCESSED
FROM V$SESSION V
LEFT JOIN V$SQL S
ON (V.SQL_ID = S.SQL_ID
V.SQL_ADDRESS = S.ADDRESS
LEFT JOIN AUDIT_ACTIONS A
ON (S.COMMAND_TYPE = A.ACTION)
LEFT JOIN V$SQL PS
ON (V.PREV_SQL_ID = PS.SQL_ID
V.SQL_ADDRESS = PS.ADDRESS
LEFT JOIN AUDIT_ACTIONS PA
ON (PS.COMMAND_TYPE = PA.ACTION)
This information can also be obtained by a session trace, but if that is not an option this is a good place to start investigating.
Oracle doesn’t recommend joining system views because doing so does not guarantee read consistency. However, I have not experienced any issues with this query.