晚上整个数据仓库更新数据,执行了一个有建表语句的过程,结果发现报了这个错误ORA-01652:unable to extend temp segment by 8192 in tablespace TEMP
,其实等临时表空间释放在执行就可以了。学习一下正常的解决方法
1.错误原因
当出现临时表空间无法扩展临时段的错误时,需要考虑语句中是否存在大量使用临时表空间的语句。临时表空间的使用通常为以下几个情况:
1.存储大规模排序结果:排序操作:包括(order by 、group by、distinct、union、intersect、minus、sort-merge joins、analyze);
2.管理索引:索引的创建,重建
3.存储临时表;
4.其他需要用到临时空间的操作:导入、查视图等。
找到之后尝试修改语句或 增大临时表空间
2.解决方法
2.1 对临时表空间(文件)的相关操作
0.查询临时表空间使用率(来源网络)
SELECT d.tablespace_name "Name",
TO_CHAR(NVL(a.bytes / 1024 / 1024, 0),'99,999,990.900') "Size (M)",
TO_CHAR(NVL(t.hwm, 0)/1024/1024,'99999999.999') "HWM (M)",
TO_CHAR(NVL(t.hwm / a.bytes * 100, 0), '990.00') "HWM % " ,
TO_CHAR(NVL(t.bytes/1024/1024, 0),'99999999.999') "Using (M)",
TO_CHAR(NVL(t.bytes / a.bytes * 100, 0), '990.00') "Using %"
FROM dba_tablespaces d,<