发生重演:
EODA@PROD1> drop table temp purge;
drop table temp purge
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
EODA@PROD1> select object_id from user_objects where object_name='TEMP';
OBJECT_ID
----------
85773
Elapsed: 00:00:00.02
EODA@PROD1> select * from v$lock where id1=85773;
ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
-------- -------- ---------- -- ---------- ---------- ---------- ---------- ---------- ----------
4AEF2538 4AEF2564 1 TO 85773 1 3 0 952 0
Elapsed: 00:00:00.02
EODA@PROD1> select sid, serial# from v$session where sid=1;
SID SERIAL#
---------- ----------
1 11
Elapsed: 00:00:00.01
EODA@PROD1> alter system kill session '1,11';
alter system kill session '1,11'
*
ERROR at line 1:
ORA-00027: cannot kill current session
发现是当前session。。于是退出当前会话重进。。
EODA@PROD1> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ocm1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 22 15:53:44 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@PROD1> conn eoda/foo
Connected.
EODA@PROD1> drop table temp purge;
Table dropped.
解决~