Version 12.2.0.1 and later
1 ,检查当前是否有人使用temp
-
select * from (
-
select se.username,se.sid,se.serial#,se.status,se.sql_hash_value,se.prev_sql_id,
-
su.tablespace,su.segtype,su.contents,round(su.blocks*8/1024,2)mb
-
from v$session se,v$sort_usage su
-
where se.saddr=su.session_addr
-
order by mb desc) where rownum<40;
-
2. 如果有则杀掉会话
-
alter system kill session '213,48649'; --sid , serial#
3. 然后删除临时文件
-
alter database tempfile '/tempxx.dbf' drop including datafiles;
看到这儿,又震惊了,怎么including datafiles,希望在21c中改为tempfiles。
参考:
How to reclaim BLOCKS (not space) on an empty temp tablespace (Doc ID 2636064.1)
阅读(975) | 评论(0) | 转发(0) |