drop tempfile后,这些tempfile在数据库的视图中依然可见。dba_temp_files or v$tempfile

某套数据库的alert日志中频繁地报数据坏块,而这些坏块都属于某个temporary表空间。由于计算drop存在坏块的tempfile,然后新增tempfile。

 

在执行alter tablespace TS_TEMP drop tempfile '......';时,执行成功。但检查dba_temp_files时,该tempfile在视图中仍然存在,检查了alert日志,也提示成功drop了该tempfile。

 

搜索到《Dropped Temp File Is Still Visible In Database And Remains On File System (Doc ID 1413933.1)》这篇文章,才知道原因。

 

The situation is caused by sessions that were using the information in the temporary file that was being dropped.

The dropping of a temporary file is done in 2 steps:

    1. The temp file is taken offline so no new sessions can access it

    2. If there are no sessions accessing the sort information in the temp file then it is dropped. If not then it is not dropped until these sessions are done with using the temp file or the sessions are exited/killed.
posted @   石云华  阅读(141)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署
点击右上角即可分享
微信分享提示