ORA-14452

Error :
 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.

Solution :
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.

Example :

SQL>CREATE GLOBAL TEMPORARY TABLE Osama ON COMMIT PRESERVE ROWS
AS SELECT * FROM employee ;

SQL> DELETE FROM Osama;
258 rows deleted.

SQL> DROP TABLE Osama;
drop table t1
*
ERROR at line 1:
ORA-14452: attempt to create, alter or drop an index on temporary table already in use

Fixing :

SQL> TRUNCATE TABLE Osama;
Table truncated.

SQL> DROP TABLE Osama;
Table dropped.

Done & Enjoy 

Osama Mustafa

2 thoughts on “ORA-14452

  1. great!But I don't understand why is the table in use after create command, or after commit commandSQL> CREATE GLOBAL TEMPORARY TABLE Osama ON COMMIT PRESERVE ROWS 2 AS SELECT * FROM dual ; Table createdSQL> DROP TABLE Osama; DROP TABLE Osama ORA-14452: attempt to create, alter or drop an index on temporary table already in useSQL> truncate table Osama; Table truncatedSQL> drop table Osama; Table droppedSQL> CREATE GLOBAL TEMPORARY TABLE Osama ON COMMIT PRESERVE ROWS 2 AS SELECT * FROM dual ; Table createdSQL> DELETE FROM Osama; 1 row deletedSQL> commit; Commit completeSQL> DROP TABLE Osama; DROP TABLE Osama ORA-14452: attempt to create, alter or drop an index on temporary table already in useSQL> truncate table Osama; Table truncatedSQL> drop table Osama; Table dropped SQL>

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.