How to get the last executed SQL statement and bind variable values in oracle

后端 未结 4 1960
感动是毒
感动是毒 2021-02-02 15:21

I have written the following query to get the last executed SQL statement in the oracle database for a particular session. The SQL text does not contain the actual value of the

4条回答
  •  渐次进展
    2021-02-02 16:17

    To get the bind variables you will have to use the code below, you dont need to use tracing.

    SELECT * FROM v$sql_bind_capture WHERE sql_id='';
    

    or

    SELECT NAME,POSITION,DATATYPE_STRING,VALUE_STRING 
    FROM v$sql_bind_capture WHERE sql_id='';
    

    http://shaharear.blogspot.com/2009/02/find-bind-variable-value.html

提交回复
热议问题