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

后端 未结 4 1923
感动是毒
感动是毒 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 15:58

    I don't think the bind variables values are stored by default. Not considering the potential security problems (seeing other sessions actual work), the amount of data to store would be massive.

    If you want to see the values of the bind variables, you should activate the trace for that session. You would do this by executing the following command in that session:

    alter session set events '10046 trace name context forever, level 12'; 
    

    More information on AskTom: 10046 tracing

提交回复
热议问题