Home > Database > Mysql Tutorial > body text

ORA-14452错误解决方法

WBOY
Release: 2016-06-07 17:17:08
Original
2556 people have browsed it

最近工作中创建了一张session级的临时表,删除的时候报下面错误:ORA-14452:试图创建,更改或删除正在使用的临时表中的索引,先从

最近工作中创建了一张session级的临时表,删除的时候报下面错误:ORA-14452:试图创建,更改或删除正在使用的临时表中的索引

网上查阅资料解决方法如下:

1、先从user_objects或dba_objects中查询到该表的object_id:

此处以sysdba登录:
C:\Documents and Settings\Administrator>sqlplus sys/Oracle@orcl as sysdba

SQL> select object_id from dba_objects where object_name=UPPER('RP_RETAIL001');

 OBJECT_ID
----------
     74317

2、根据查到的object_id知道使用该表的session:

SQL> set linesize 1000
SQL> select * from v$lock where id1=74317;

ADDR             KADDR                   SID TY        ID1        ID2      LMODE    REQUEST      CTIME      BLOCK
---------------- ---------------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
000007FFC70967C0 000007FFC70967E0        166 TO      74317          1          3          0        424          0

3、在从v$session视图中查到该session的SID和SERIAL#:

SQL> select serial# from v$session where sid=166;

   SERIAL#
----------
     51595

4、杀掉这些进程:

SQL> alter system kill session '166,51595';

系统已更改。

5 最后以普通用户登录,删除临时表:

SQL> conn dylan/abc123@orcl
已连接。
SQL> drop table rp_retail001;

表已删除。

-------------------------------------------
made by dylan.

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template