"ORA-00054 resource busy and acquire with NOWAIT specified"的解決方法
今天在做同步時,出現如下錯誤:
ORA-00054 resource busy and acquire with NOWAIT specified
”資源正忙,需指定nowait"
出現這個問題的原因是正在執行的操作請求的資源正被其他事務鎖定。
nowait:立即執行,如果另有會話正在修改該記錄會立即報告錯誤:ORA-00054: 資源正忙,要求指定 NOWAIT;如果不選擇nowait選項則會一直處理等待狀態。
wait [n]:等待n秒,如果另有會話正在修改該記錄會報告錯誤:ORA-30006: 資源已被佔用; 執行操作時出現 WAIT 超時
=>另外,還有一個skip locked。
skip locked:跳過已被別的會話鎖定的記錄。
例如:
SELECT ... FOR UPDATE [OF ...][NOWAIT | WAIT integer]
NOWAIT指在執行"SELECT ... FOR UPDATE"時其他事務修改了該查尋的結果但還沒有提交,此時將立即返回如下結果:
ORA-00054: resource busy and acquire with NOWAIT specified
如果不使用NOWAIT等項,預設為等待(WAIT)其他事務提交後在返回結果。
WAIT integer,與NOWAIT的功能相似,但可以等待使用者指定的秒數。如:"WAIT 3"等待3秒後,其他事務還沒有提交將返回如下結果:
ORA-30006: resource busy; acquire with WAIT timeout expired 。
出現這種問題後查V$LOCKED_OBJECT,要麼等事務結束後再做,要麼殺掉持有鎖的會話(如果不是關鍵會話):
1.透過上句查詢出已被鎖定的資料庫表及相關的sid、serial#及spid
select object_name as 物件名稱,s.sid,s.serial#,p.spid as 系統程式號
from v$locked_object l , dba_objects o , v$session s , v$process p
where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr;
2.在資料庫中滅掉相關session
alter system kill session 'sid,serial#';--sid及serial#為第一步查出來的資料。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/670493/viewspace-1025077/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ora-00054:resource busy and acquire with nowait specified解決方法UIAI
- ORA-00054: resource busy and acquire with NOWAIT specifiedUIAI
- ora-00054:resource busy and acquire with nowait specifiedUIAI
- ORA-00054: resource busy and acquire with NOWAIT specified處理UIAI
- ORA-00054:resource busy and acquire with nowaitUIAI
- ORA-00054: resource busy and acquire with NOWAITUIAI
- oracle之 RA-00054: resource busy and acquire with NOWAITOracleUIAI
- ORA-00054,ORA-00031 resource busy and acquire with NOWAIT 資源佔用處理過程UIAI
- Oracle wait interface - ORA-00054: resource busyOracleAI
- No input file specified 解決方法
- 分析解決11gR2 雙節點RAC環境下的gc cr block busy/gc buffer busy acquire等待GCBloCUI
- 如何解決ORA-00054資源正忙,要求指定NOWAITAI
- gc buffer busy acquire問題處理GCUI
- 【Oracle】ORA-00054 錯誤解決方法Oracle
- ORA-00054 解決方法其中 1 例.
- RAC遇到GC Buffer Busy的解決方法2GC
- RAC遇到GC Buffer Busy的解決方法1GC
- no input file specified 三種解決方法
- open failed: EBUSY (Device or resource busy)AIdev
- ORA-00054: 資源正忙,要求指定 NOWAITAI
- No input file specified 出現的原因及解決方法
- ORA-25507: resource 解決方法
- Oracle ASM oracleasm createdisk "Device or resource busy"OracleASMdev
- 【轉】RAC安裝時,報The specified nodes are not clusterable 的解決方法
- ora-00054: 資源正忙, 但指定以 nowait 方式獲取資源如何解決AI
- mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解決方法MySql
- 啟動Amoeba報The stack size specified is too small解決方法
- oracle之報錯:ORA-00054: 資源正忙,要求指定 NOWAITOracleAI
- ORA-00054錯誤解決方案(摘)
- device-mapper create ioctl failed: Device or resource busydevAPPAI
- C# Aes CryptoStream Specified padding mode is not valid for this algorithm的解決方法C#paddingGo
- FILE ON OCFS CANNOT BE DELETED LINUX ERROR: 16: DEVICE OR RESOURCE BUSYdeleteLinuxErrordev
- oracle錯誤處理之ORA-00054:資源正忙,要求指定NOWAITOracleAI
- 解決IDEA Error:Output directory is not specifiedIdeaError
- Linux rm -rf 之rm: cannot remove `linux': Device or resource busyLinuxREMdev
- 解決umount.nfs: /data: device is busy 問題NFSdev
- 解決 CRS-2640: Required resourceUI
- Access restriction: The type 'Resource' is not API 解決辦法RESTAPI