-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- AUTHOR           : Sameer Choudhari
-- DESCRIPTION      : Displays information on bind variables used by SQL cursors.
-- USAGE            : @display_bind_variables.sql
-- LAST MODIFIED    : 01/10/2016
-- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SET lines 220 pages 49999
COLUMN NAME format a30
COLUMN datatype_string format a30
COLUMN was_captured format a15
COLUMN value_string format a50
COLUMN value_anydata format a30 ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
SELECT inst_id,
  address,
  hash_value,
  NAME,
  position,
  datatype_string,
  was_captured,
  last_captured,
  value_string
FROM gv$sql_bind_capture
WHERE sql_id    ='&sql_id'
AND was_captured='YES'
ORDER BY inst_id;