ITPub博客

首页 > 数据库 > Oracle > ORA-14452

ORA-14452

原创 Oracle 作者:wanyahai 时间:2014-03-20 19:56:00 0 删除 编辑
今天在删除临时表的时候出现如下报错信息:

点击(此处)折叠或打开

  1. SQL> drop table sys_event_session;
  2. drop table sys_event_session
  3.            *
  4. ERROR at line 1:
  5. ORA-14452: attempt to create, alter or drop an index on temporary table already
  6. in use
之前该表的建表语句如下:

点击(此处)折叠或打开

  1. SQL> create global temporary table sys_event_session
  2.   2 on commit preserve rows
  3.   3 as
  4.   4 select *
  5.   5 from v$system_event
  6.   6 where 1 = 0;

  7. Table created.

  8. SQL> insert into sys_event_session
  9.   2 select * from v$system_event;
在linux环境下执行:oerr ora 14452  显示如下:

点击(此处)折叠或打开

  1. [oracle@centos5 ~]$ oerr ora 14452
  2. 14452, 00000, \"attempt to create, alter or drop an index on temporary table already in use\"
  3. // *Cause: An attempt was made to create, alter or drop an index on temporary
  4. // table which is already in use.
  5. // *Action: All the sessions using the session-specific temporary table have
  6. // to truncate table and all the transactions using transaction
  7. // specific temporary table have to end their transactions.
通过Action不难发现,只需要在drop table tablename之前执行truncate table tablename即可。如下:

点击(此处)折叠或打开

  1. SQL> truncate table sys_event_session;

  2. Table truncated.

  3. SQL> drop table sys_event_session;

  4. Table dropped.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29173997/viewspace-1126224/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 索引类型
请登录后发表评论 登录
全部评论

注册时间:2013-11-17

  • 博文量
    39
  • 访问量
    72520