在Oracle中遇到这样的错误, 是什么含义呢?
ORA-00604: 递归 SQL 层 1 出现错误
ORA-14450: 试图访问已经在使用的事务处理临时表
首先要查一下错误信息, 可以从手册中查:
Cause: An attempt was made to access a transactional temporary table that has been already populated by a concurrent transaction of the same session.
Action: Do not attempt to access the temporary table until the concurrent transaction has committed or aborted.
可见是Global Temporary Table上的问题, 我们来模拟一下这个错误:
session 1 (Do not exit)
SQL> create global temporary table t_temp
2 (
3 col1 varchar2(200)
4 )
5 on commit preserve rows;
Table created.
SQL> insert into t_temp values ('temp');
1 row created.
SQL> commit;
Commit complete.
session 2
SQL> drop table t_temp;
drop table t_temp
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table alreadyin use
SQL> alter table t_temp add col2 varchar2(200);
alter table t_temp add col2 varchar2(200)
*
ERROR at line 1:
ORA-14450: attempt to access a transactional temp table already in use
而ORA-00604则是因为这段代码是在sys下跑的原因吧.