oracle ORA-14452錯誤處理例程
今天,同事突然讓我建立一個索引,說他建立不上。我拿過來一看,語句很 簡單:create index IDX_AQ_NEFILTER on AQ_NEFILTER (INT_ID);。可是一執行就報錯。錯誤資訊:
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.
因為表AQ_NEFILTER 為臨時表,而且有其他session正在使用。
處理步驟:
1、先從user_objects中查詢到該表的object_id:
select object_id from user_objects where object_name=upper('aq_nefilter');
2、根據查到的object_id知道使用該表的session:
select * from v$lock where id1=&object_id;
3、在從v$session檢視中查到該session的SID和SERIAL#:
select * from v$session where sid=181;
4、殺掉這些程式:
alter system kill session SID,SERIAL#;
5、重新建立索引(4,5兩步一定要快,否則,剛結束一個session,又有新的session使用該表了):
create index IDX_AQ_NEFILTER on AQ_NEFILTER (INT_ID);
至此,已經建立成功。不過,這個過程中我有個疑問,v$lock 檢視中的id1欄位是什麼意思?和user_objects 檢視中的object_id欄位是對應的麼?哪位看過了給解釋下?
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/751371/viewspace-566584/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle異常錯誤處理Oracle
- ORACLE 異常錯誤處理Oracle
- oracle ora-00054錯誤處理Oracle
- 錯誤處理
- Python錯誤處理Python
- PHP 錯誤處理PHP
- php錯誤處理PHP
- Go 錯誤處理Go
- 錯誤處理:如何通過 error、deferred、panic 等處理錯誤?Error
- openGauss 處理錯誤表
- go的錯誤處理Go
- axios 的錯誤處理iOS
- Python錯誤處理和異常處理(二)Python
- 淺談前端錯誤處理前端
- PHP 核心特性 - 錯誤處理PHP
- 15-錯誤處理(Error)Error
- Go語言之錯誤處理Go
- grpc中的錯誤處理RPC
- laravel9 錯誤處理Laravel
- 學習Rust 錯誤處理Rust
- rust學習十、異常處理(錯誤處理)Rust
- node端統一錯誤處理
- node錯誤處理與日誌
- [轉] Scala Try 與錯誤處理
- js錯誤處理權威指北JS
- [譯] 使用 Catcher 處理 Flutter 錯誤Flutter
- 如何處理錯誤訊息PleaseinstalltheLinuxkernelheaderfilesLinuxHeader
- 錯誤碼全域性處理(二)
- 錯誤碼全域性處理(一)
- PHP安裝後錯誤處理PHP
- 常用模組 PHP 錯誤處理PHP
- Restful API 中的錯誤處理RESTAPI
- 請教 Element 的錯誤處理
- 異常錯誤資訊處理
- 程式錯誤型別及其處理型別
- 【譯】RxJava 中的錯誤處理RxJava
- ORA-01591錯誤故障處理
- go 錯誤處理設計思考Go
- Golang通脈之錯誤處理Golang