wed aug 20 17:16:37 2008 ora-1652: unable to extend temp segment by 128 in tablespace dba_temp 要解决这个问题,我们首先要导致这个问题的sql,可能方法有几种: 1、设置events alter system set events '1652 trace name errorstack level 1'; 这种方
wed aug 20 17:16:37 2008
ora-1652: unable to extend temp segment by 128 in tablespace dba_temp
要解决这个问题,我们首先要导致这个问题的sql,可能方法有几种:
1、设置events
alter system set events '1652 trace name errorstack level 1';
这种方法有一定局限:
1)它不能获取已发生的1652的错误信息,只能对以后出现1652错误时生成一个trace文件;
2)用events,不清楚会对数据库有什么不好的影响。
2、查询v$sql视图:
如select * from v$sql order by direct_writes/executions desc;
这种方法的局限性是:
1)因为很难知道v$sql视图中的sql执行时间,难以确认具体是那个sql导致错误的
2)引起问题的sql极有可能已经被age out了
3、 生成错误发生时的awr、statspack报表,从报表中的sql ordered by reads部分找出sql
这种方法更不可靠,,因为:
1) sql ordered by reads读写的不一定是临时表空间
2) awr/statspack报表是根据物理读的总量排序的,如果导致问题的sql执行次数少,那也是不会出现在这些报表中的。
4、查询awr相关视图
对于10g来说,这种方法是最可行、最准确的。
select distinct to_char(substr(b.sql_text,1,4000))
from sys.wrh$_sqltext b
where b.sql_id in
(select sql_id
from
(select a.sql_id
from sys.wrh$_sqlstat a
where a.parsing_schema_name not in ('sys')
and a.executions_total >0
and a.direct_writes_total >0
and a.snap_id in
(select snap_id
from sys.wrm$_snapshot
where to_date('2008:08:20 17:20:08','yyyy:mm:dd hh24:mi:ss') between begin_interval_time and end_interval_time
)
order by a.direct_writes_total/ a.executions_total desc
)
where rownum
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!