风哥教程

培训 . 交流 . 分享
Make progress together!

oracle查找什么sql语句占用了临时段

[复制链接]
内容发布:paulyi| 发布时间:2014-2-17 20:40:02
oracle查找什么sql语句占用了临时段

How Do You Find Who And What SQL Is Using Temp Segments [ID 317441.1]

修改时间 13-APR-2010 类型 HOWTO 状态 PUBLISHED

In this Document
[size=-1]Goal
Solution
References


Applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.2 and later [Release: 10.1 and later ]
Information in this document applies to any platform.

GoalHow Do You Find Who And What SQL Is Using Temp Segments?

SolutionFor 8.1.7 to 9.2:

SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text
FROM v$session a, v$sort_usage b, v$sqlarea c
WHERE a.saddr = b.session_addr
AND c.address= a.sql_address
AND c.hash_value = a.sql_hash_value
ORDER BY b.tablespace, b.blocks;

For 10.1 and above:

SELECT a.username, a.sid, a.serial#, a.osuser, b.tablespace, b.blocks, c.sql_text
FROM v$session a, v$tempseg_usage b, v$sqlarea c
WHERE a.saddr = b.session_addr
AND c.address= a.sql_address
AND c.hash_value = a.sql_hash_value
ORDER BY b.tablespace, b.blocks;

NOTE: Indications are that the SQL retrieval does not work for parallel query slaves ... only the parent process



上一篇:veritas netbackup备份软件异机恢复oracle需要注意问题
下一篇:netbackup异机恢复报RMAN-03009 ORA-19554 ORA-27211 错误
回复

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门文章教程

  • 实战PHP与MySQL权威指南PDF电子书下载
  • 大数据技术与应用入门培训教程(电子版下载
  • Oracle 12cR2 九大新功能全面曝光_详解云数
  • Oracle OCP认证考试IZ0-053题库共712题数据
  • MySQL5权威指南(第3版)PDF电子版下载
  • 风哥Oracle数据库巡检工具V1.0(附2.6网页
快速回复 返回顶部 返回列表