Pythontr

husonet | Tarih: 13.05.2014

Oracle Nowait Hatası Çözümü

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

Oracle Nowait Hatası

select     oracle_username || ' (' || s.osuser || ')' username
, s.sid || ',' || s.serial# sess_id
, owner || '.' || object_name object
, object_type
, decode( l.block
, 0, 'Not Blocking'
, 1, 'Blocking'
, 2, 'Global') status
, decode(v.locked_mode
, 0, 'None'
, 1, 'Null'
, 2, 'Row-S (SS)'
, 3, 'Row-X (SX)'
, 4, 'Share'
, 5, 'S/Row-X (SSX)'
, 6, 'Exclusive', TO_CHAR(lmode)) mode_held
from v$locked_object v
, dba_objects d
, v$lock l
, v$session s
where v.object_id = d.object_id
and v.object_id = l.id1
and v.session_id = s.sid
order by oracle_username
, session_id

Yada daha kısa bir sql yazalım


select s.sid, s.serial#, p.spid 
from
v$session s,
v$process p
where s.paddr = p.addr
and s.sid in (select SESSION_ID from v$locked_object);

Id mizi yazıp aşağıdaki satırı çalıştıralım.


alter system kill session 'SID,SERIAL';
Örnek
alter system kill session '140,21273';