Cause: Tried to drop a GTT Global temporary table but I got an error 'ORA-14452: attempt to create, alter or drop an index on temporary table already in use'.
Here problem with not completed the transaction in any session and tried to drop the table then we will get this error. For session specifict GTT, one created with ON COMMIT PRESERVE ROWS, the session needs to truncate the GTT.
Action: Followed below steps to DROP GTT
Best Regards,
Chowdari
Here problem with not completed the transaction in any session and tried to drop the table then we will get this error. For session specifict GTT, one created with ON COMMIT PRESERVE ROWS, the session needs to truncate the GTT.
Action: Followed below steps to DROP GTT
1) Tried to drop a GTT
SQL> drop table REGISTR.ENT_GTT;
drop table REGISTR.ENT_GTT
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
SQL>
2) First we need to verify If any active session is locking this object, If yes, then we can find the SID of that locked object.
SQL> select * from v$lock where id1 = (select object_id from dba_objects where owner = 'REGISTR' and object_name = 'ENT_GTT');
SID is 447.
3) Kill the session using the SID
SQL> select inst_id,'alter system kill session ''' || SID || ',' || SERIAL# || ''' IMMEDIATE;' from gv$session gg where gg.SID =447;
SQL> alter system kill session '447,4045' IMMEDIATE;
System altered
4) Now I dropped the GTT with out any issues
SQL> drop table REGISTR.ENT_GTT;
Table dropped
SQL>
That's it..Hope this will help you...:)Best Regards,
Chowdari
Thank you so much for this! I was beginning to think that all Oracle programmers were total jerks because all they want to do is tell me that I'm stupid because I want to delete a GTT. Perhaps they should consider the possibility that I might need to change it because it is still in development and testing. Again, thank you!!
ReplyDeleteExactly, had the same feeling, have same comment!
DeleteThank you for your comment.. :)
ReplyDeleteHi Dude,
ReplyDeleteThanks for the post.It's very useful for me to troubleshoot the GTT issue.
- Saravanan R
Thanks dude for your comment. :)
ReplyDeleteThanks dear
ReplyDeleteYou can bounce db and drop any object easily
Kamran
Thank You...!! I tried everything but it didnot work. Atlast you blog helped me :) :)
ReplyDeleteThis helped me, too. thanks so much!
ReplyDelete@ #kamran Umer, local environments lets say development or Testing etc.., frequently we got ora-14452 errors,,for every time we cant bounce the database right.
ReplyDelete@Ryan Atwood,, Thanks for your comment,, and I am very happy this article has helped you :)
ReplyDeletePlease truncate the table then drop it.
ReplyDeletetruncate, then drop +1
ReplyDeletethanks , thats works fine
ReplyDeleteThanks for this! Very helpful!
ReplyDeleteDan
Tq. good content. helped me !!!! :)
ReplyDeleteThank you, this was helpful :)
ReplyDeleteUseful one, thank you.
ReplyDeleteRegards,
Ram
yozgat
ReplyDeletesivas
bayburt
van
uşak
GJQ
0EA37
ReplyDeleteMuğla Evden Eve Nakliyat
Malatya Evden Eve Nakliyat
Kütahya Lojistik
Elazığ Parça Eşya Taşıma
Eskişehir Evden Eve Nakliyat
4DAD3
ReplyDeleteHatay Şehir İçi Nakliyat
Isparta Şehirler Arası Nakliyat
Karaman Lojistik
Sivas Parça Eşya Taşıma
Sinop Lojistik
Yenimahalle Parke Ustası
Kripto Para Borsaları
Batman Parça Eşya Taşıma
Çerkezköy Çamaşır Makinesi Tamircisi
67951
ReplyDeleteBursa Şehirler Arası Nakliyat
Antalya Evden Eve Nakliyat
Antalya Şehir İçi Nakliyat
Kırıkkale Evden Eve Nakliyat
Jns Coin Hangi Borsada
Ağrı Şehirler Arası Nakliyat
Kocaeli Şehirler Arası Nakliyat
Yobit Güvenilir mi
Burdur Şehir İçi Nakliyat
78288
ReplyDeleteÇerkezköy Petek Temizleme
Kırıkkale Lojistik
Batıkent Parke Ustası
Kütahya Lojistik
Artvin Şehir İçi Nakliyat
Ardahan Lojistik
Hotbit Güvenilir mi
Ordu Şehir İçi Nakliyat
Keep Coin Hangi Borsada