[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;

 

 

你可能感兴趣的:(ORA_ERR)