免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12305 | 回复: 8
打印 上一主题 下一主题

如何查看oracle日志的sql操作? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-30 16:50 |只看该作者 |倒序浏览
如何查看oracle日志的sql操作?
系统环境:fedora4,oracle10i
eg:tomcat中定时的java任务中有很多sql,我想查看它们的执行情况,什么时候运行,查询效率,什么时候结束,是否有问题等等

论坛徽章:
0
2 [报告]
发表于 2006-12-01 08:57 |只看该作者
不会的帮忙顶一下呀

论坛徽章:
0
3 [报告]
发表于 2006-12-01 10:37 |只看该作者
可以使用logminer, tomcat的日志也可以看吧?

论坛徽章:
0
4 [报告]
发表于 2006-12-01 10:52 |只看该作者
desc v$sql_text

论坛徽章:
0
5 [报告]
发表于 2006-12-01 15:32 |只看该作者
帮忙顶一下呀

论坛徽章:
0
6 [报告]
发表于 2006-12-01 21:10 |只看该作者
tomcat日志是个好主意。
desc v$sql_text ;不好使ya

论坛徽章:
0
7 [报告]
发表于 2006-12-02 22:53 |只看该作者
maybe you'd better to run a statspack report

论坛徽章:
0
8 [报告]
发表于 2006-12-03 08:31 |只看该作者
6楼的建议很好,谢谢!
另外,tomcat我试了一下,结果不是太直观,但还是感谢各位的建议!

论坛徽章:
0
9 [报告]
发表于 2006-12-04 16:06 |只看该作者
1) create a logon trigger and then enable 10046 trace in the trigger
google key word "logon trigger 10046 oracle"
2) query v$sql. it has the sql text and many other execution statistics of the SQL (fetches, executions, first_load_time, disk_reads, etc)
3) use debug version of the jdbc library (under $ORACLE_HOME/jdbc/lib/ojdbc14_g.jar). again search the net to see how to use it
4) enable sql trace (dbms_monitor.session_trace_enable)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP