日期:2014-05-17  浏览次数:20793 次

报错ORA-01652:无法通过128(在表空间TEMP)扩展TEMP段
select *
  from (select a.deviceid,
f.ZWCM,
h.BWMC PORTNAME,
t.cbbh,
'正常' XINHAO,
a.gpstime,
'进港' state,
t.ywbh,
f.cbzldm,
to_char(t.czsj, 'yyyy-mm-dd hh24:mi:ss') time
from zxdb.DTYW_QZCY_JGORCG_SS t,
zxdb.DTYW_CBJBXX f,
zxdb.DTXT_BW h,
gps.gpsinfo a,
gps.boatinfo b
where t.cbbh = f.cbbh(+)
and t.bwdm = h.bwdm(+)
and f.zwcm = b.boatname(+)
and b.id = a.deviceid(+)
and t.jg_cg = 'j'
and t.czsj between to_date('2011-12-07 16', 'yyyy-mm-dd hh24') and
to_date('2011-12-08 16', 'yyyy-mm-dd hh24')) c
 运行没有问题
在最外面加上 
where trunc((sysdate - c.gpstime) * 24 * 60) < 10

之后 报错ORA-01652:无法通过128(在表空间TEMP)扩展TEMP段?

------解决方案--------------------
临时空间不能扩展了,
解决方法:
1:设置临时表空间的数据文件自动扩展
2:手动增大临时表空间的数据文件大小
------解决方案--------------------
原因不多讲了,具体解决方法请参考:
SQL code

-- 首先查询你的表空间的临时表空间对应的数据文件名
select file_id from dba_temp_files where tablespace_name=你的表空间名;

-- 使用刚刚查询出来的file_id更改时间表空间的增长方式为自动增长
alter database tempfile file_id autoextend on next 100M maxsize 1G;