combine the v$session, v$open_cursor views for sid columns, terminal column of v$session and and sql_text columns of v$open_cursor to get the exact SID..