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:
- The temp file is taken offline so no new sessions can access it
- 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.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署