如何使用参数值记录/跟踪Oracle存储过程调用? [英] How do I log/trace Oracle stored procedure calls with parameter values?

查看:180
本文介绍了如何使用参数值记录/跟踪Oracle存储过程调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在寻找一种方法来记录对Oracle中对存储过程的任何调用,并查看该调用使用了哪些参数值.

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.

我们正在使用Oracle 10.2.0.1

We're using Oracle 10.2.0.1

我们可以记录SQL语句并查看绑定变量,但是当我们跟踪存储过程时,我们看到绑定变量B1,B2等,但是没有值.

We can log SQL statements and see the bound variables, but when we track stored procedures we see bind variables B1, B2, etc. but no values.

我们希望看到与在MS SQL Server Profiler中看到的信息相同的信息.

We'd like to see the same kind of information we've seen in MS SQL Server Profiler.

感谢您的帮助

推荐答案

您可以查看

You could take a look at the DBMS_APPLICATION_INFO package. This allows you to "instrument" your PL/SQL code with whatever information you want - but it does entail adding calls to each procedure to be instrumented.

另请参见此AskTom线程关于使用DBMS_APPLICATION_INFO监视PL/SQL.

See also this AskTom thread on using DBMS_APPLICATION_INFO to monitor PL/SQL.

这篇关于如何使用参数值记录/跟踪Oracle存储过程调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆