Oracle:是否有跟踪查询的工具,例如用于 sql server 的 Profiler?

2021-12-05 00:00:00 oracle sql-server profiler

我使用 sql server,但我必须迁移到使用 Oracle DB 的应用程序.为了跟踪我的应用程序查询,在 Sql Server 中我使用了很棒的 Profiler 工具.Oracle 有没有类似的东西?

i work with sql server, but i must migrate to an application with Oracle DB. for trace my application queries, in Sql Server i use wonderful Profiler tool. is there something of equivalent for Oracle?

推荐答案

您可以使用 Oracle Enterprise Manager 监视活动会话,包括正在执行的查询、其执行计划、锁、一些统计信息甚至进度更长的任务栏.

You can use The Oracle Enterprise Manager to monitor the active sessions, with the query that is being executed, its execution plan, locks, some statistics and even a progress bar for the longer tasks.

参见:http://download.oracle.com/docs/cd/B10501_01/em.920/a96674/db_admin.htm#1013955

转到实例 -> 会话并查看每个会话的 SQL 选项卡.

Go to Instance -> sessions and watch the SQL Tab of each session.

还有其他方法.企业管理器只是用漂亮的颜色放置在特殊视图中已经可用的东西,比如这里记录的那些:http://www.oracle.com/pls/db92/db92.catalog_views?remark=homepage

There are other ways. Enterprise manager just puts with pretty colors what is already available in specials views like those documented here: http://www.oracle.com/pls/db92/db92.catalog_views?remark=homepage

当然,您还可以使用解释计划、跟踪工具和大量其他工具化方法.企业管理器中有一些关于最昂贵的 SQL 查询的报告.您还可以搜索保存在缓存中的最近查询.

And, of course you can also use Explain PLAN FOR, TRACE tool and tons of other ways of instrumentalization. There are some reports in the enterprise manager for the top most expensive SQL Queries. You can also search recent queries kept on the cache.

相关文章