Detect the value of a binding variable in an Oracle PL/SQL Cursor


Get the sid of your observed session

Get the sql_id of this session, e.g.:

SELECT sql_id, prev_sql_id FROM v$session where sid=<your sid>;

Get the latest bind variable:

SELECT last_captured, value_string FROM v$sql_bind_capture WHERE sql_id = '<your sql_id>';

Note: this value ist updated every 900s by default, hidden parameter _cursor_bind_capture_interval.