How do I log/trace Oracle stored procedure calls with parameter values?

后端 未结 4 1576
不思量自难忘°
不思量自难忘° 2020-12-19 14:10

We\'re looking for a way to log any call to stored procedures in Oracle, and see what parameter values were used for the call.

We\'re using Oracle 10.2.0.1

W

4条回答
  •  温柔的废话
    2020-12-19 14:59

    I think you are using the word "log" in a strange manner.

    We can log SQL Statements...

    Do you really mean to say you can TRACE sql statements with bind variables? Tony's answer is directed to the ability to LOG what you are doing. This is always superior to tracing because only you know what is important to you. Perhaps the execution of your process depends heavily on querying a value from a table. Since that value changes and it's not passed in as a parameter, you could lose that information.

    But if you actually LOG what you are doing, you can include that value in your Log table and you'll know not only the variables you passed in but that key value as well.

    alter system set events '10046 trace name context forever, level 12'; Is that what you were using?

提交回复
热议问题