ORA-14452: attempt to create, alter or drop an index on temporary table already in use

ORA-14452: attempt to create, alter or drop an index on temporary table already in use

 

drop table tmp
Error report -
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
14452. 00000 -  "attempt to create, alter or drop an index on temporary table already in use"
*Cause:    An attempt was made to create, alter or drop an index on temporary
           table which is already in use.
*Action:   All the sessions using the session-specific temporary table have
           to truncate table and all the transactions using transaction
           specific temporary table have to end their transactions.
 

Step1: select object_id from user_objects where object_name='TMP';

OBJECT_ID
----------
79477

Step2: select * from v$lock where id1 = 79477;

SQL> select ADDR, KADDR, SID, ID1, ID2 from v$lock where id1 = 79477;

ADDR             KADDR                   SID        ID1        ID2
---------------- ---------------- ---------- ---------- ----------
00000003748DDA00 00000003748DDA58         65      79477          1

Step3: select sid, serial# from v$session where sid=65;

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

       SID    SERIAL#
---------- ----------
        65        153

Step4: alter system kill session '65,153';

SQL> alter system kill session '65,153';

System altered.

Step5: double check 

SQL> drop table tmp;

Table dropped.

SQL>

 

你可能感兴趣的:(Oracle)