ORA-1652 unable to extend temp segment by 128 in tablespace

1,314 阅读1分钟

ORA-1652是oracle常见错误之一,该错误主要是由于临时表空间不足导致。

需要对表空间进行重建,新建一个数据库的临时表空间temp02

• SQL> create temporary tablespace TEMP02 TEMPFILE '/u01/app/oracle/product/10.2.0/db_1/dbs/temp02.dbf' SIZE 512M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED;

alter tablespace TEMP02 add tempfile 'D:\ORACLE\ORADATA\DBA\TEMP02_2.DBF' size 100m autoextend on next 100m maxsize 16g;

• Tablespace created.

更改数据库的默认临时表空间为temp02

• SQL> alter database default temporary tablespace temp02;

• Database altered.

删除原来的默认临时表空间TEMP01

• SQL> drop tablespace temp01 including contents and datafiles;

• Tablespace dropped.

删除过程中可能会卡住,原因是临时表空间有正在执行的任务,先查出该任务,再kill掉

结束使用的进程

select 'alter system kill session '''||sid||','||serial#||''' immediate;' from vsession vs,vtempseg_usage vt where vs.saddr=vt.session_addr and vt.tablespace='TEMP';