[ORACLE]ORA-14452錯誤描述及處理

描述:

 

ORA-14452: 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.

 

 

處理:

 

BEGIN
for x in ( select sid,serial# sl from v$session where sid in
  (select SID from v$lock where id1=(select object_id from dba_objects where object_name=upper('T_TEMP_TAB') and owner='XXX'))) loop
  execute immediate 'ALTER SYSTEM KILL SESSION '''||x.sid||','||x.sl||''' ';
end loop;
END;

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章