简体   繁体   English

Oracle 8i跟踪SQL语句

[英]Oracle 8i trace of sql statements

I am investigating a legacy app that uses an Oracle 8i database in a test environment, specifically trying to find out what tables are accessed for read, insert, update or delete when the user performs an app function. 我正在研究在测试环境中使用Oracle 8i数据库的旧版应用程序,特别是试图找出用户执行应用程序功能时要访问哪些表以进行读取,插入,更新或删除。

What is the best/easiest way to do this? 最好/最简单的方法是什么? Can I simply get a list of all sql statements sent to the database? 我可以简单地获取发送到数据库的所有sql语句的列表吗? Can I see when stored procedures are called? 我可以看到何时调用存储过程吗?

Having little experience with Oracle but getting help from a DBA, I'm thinking I should either use a trace or look at the redo log with LogMiner, but how? 我对Oracle的经验很少,但是可以从DBA获得帮助,我想应该使用跟踪还是使用LogMiner查看重做日志,但是如何?

Thanks! 谢谢!

What you could do is to harvest the sql's from v$sql. 您可以做的是从v $ sql中收获sql。 If the SQL's are properly written - using bind variables - you should be able to catch most of the statements in a table for this. 如果使用绑定变量正确地编写了SQL,则应该能够在表中捕获大多数语句。 I currently have no running v8 at hand but this should be possible. 我目前没有正在运行的v8,但应该可以。

In order to get most of them, you probably need to repeat the harvesting during the various workloads that run on the database. 为了获得其中的大多数,您可能需要在数据库上运行的各种工作负载期间重复收集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM