advertisements
_____________________________________________________________________________________________________________________
To retrieve the value of a bind variable in Oracle, you can use the V$SQL_BIND_CAPTURE view or the DBMS_APPLICATION_INFO package, depending on your use case. Here's how you can do it:
Using V$SQL_BIND_CAPTURE View:
The V$SQL_BIND_CAPTURE view provides information about captured bind values for SQL statements in the library cache. You can query this view to retrieve the values of bind variables for specific SQL statements.
Here's an example:
SELECT * FROM V$SQL_BIND_CAPTURE WHERE SQL_ID = 'your_sql_id';
advertisements
SELECT sql_id, b. LAST_CAPTURED, t.sql_text sql_text, b.HASH_VALUE, b.name bind_name, b.value_string bind_value FROM gv$sql t JOIN gv$sql_bind_capture b using (sql_id) WHERE b.value_string is not null AND sql_id='&sqlid' /
_____________________________________________________________________________________________________________________
0 comments:
Post a Comment