ORA-25152: TEMPFILE cannot be dropped at this time问题解决
来源:互联网 发布:sql insert语句返回值 编辑:程序博客网 时间:2024/04/28 17:58
删除过程:
SQL> alter database tempfile '/u01/app/oracle/oradata/temp2' drop including datafiles;alter database tempfile '/u01/app/oracle/oradata/temp2' drop including datafiles*ERROR at line 1:ORA-25152: TEMPFILE cannot be dropped at this time
通过查看官方针对ORA-25152的描述信息,发现如下:
ORA-25152: TEMPFILE cannot be dropped at this timeCause: An attempt was made to drop a TEMPFILE being used by online usersAction: The TEMPFILE has been taken offline. Try again, later
可能是临时表空间被占用,执行以下脚本,查询出占用临时表空间的会话信息,使用alter system kill命令杀掉会话进程,即可解决问题,脚本如下:
SELECT s.sid, s.username, s.status, u.tablespace, u.segfile#, u.contents, u.extents, u.blocks FROM v$session s, v$sort_usage u WHERE s.saddr = u.session_addr ORDER BY u.tablespace, u.segfile#, u.segblk#, u.blocks;
查看具体会话,构造alter system kill语句
select s."SID", s."SADDR", s."SERIAL#" from v$session s where s."SID" = '15';杀掉会话进程的语句需要传递参数,会话ID和"SERIAL#"的值alter system kill session '15,43';
可以正常的执行删除临时表空间文件的命令
或者可以通过如下的脚本,构造批量删除杀掉会话的语句:
select 'alter system kill session ''' || a.sid || ',' || a.serial# || ''' immediate;' from v$session a, v$sort_usage b, v$parameter d where a.saddr = b.session_addr and b.tablespace = 'TEMP' order by b.tablespace, b.segfile#, b.segblk#, b.blocks;
0 0
- ORA-25152: TEMPFILE cannot be dropped at this time问题解决
- ORA-00376: file X cannot be read at this time 问题解决
- ORA-00376:file xx cannot be read at this time
- ORA-00376:file x cannot be read at this time
- ORA-00376:file 142 cannot be read at this time---ORA-01110
- ORA-00376: file 202 cannot be read at this time ORA-01110: data file 202故障处理
- sysaux01.dbf cannot be read at this time
- IIS - this configuration section cannot be used at this path
- IIS - this configuration section cannot be used at this path (configuration locking?)
- All versions of the libraries must be the same at this time.
- svn报错can only be performed on a version resource [at this time].
- CHECKOUT can only be performed on a version resource [at this time].
- svn报错can only be performed on a version resource [at this time].
- 20110323_BMXAA7901E - You cannot log in at this time. Contact the system administrator
- Multiple annotations found at this line: - String cannot be resolved to a type
- Multiple markers at this line - The type java.lang.Object cannot be resolve
- Multiple markers at this line - The type java.lang.String cannot be resolved.
- Multiple markers at this line - The import javax.servlet cannot be resolved
- Java语法基础-1
- Java构建HashCode相同字符串算法
- 推荐15个很优秀的跨平台的移动开发工具
- Android 线程开发笔记 2 Looper
- Linux中使用VS Code编译调试C++项目详解
- ORA-25152: TEMPFILE cannot be dropped at this time问题解决
- SpringMVC学习笔记(未完)
- pta习题集 5-10 切分表达式——写个tokenizer吧
- 多线程11_张孝祥 java5的线程锁技术
- ccfcsp201612-四边形不等式优化
- IntelliJ IDEA 2016.2.5激活码
- 从头到尾打印链表
- 遍历
- POJ 3186 Treats for the Cows