› Fóruns › Banco de dados Oracle › erro banco Oracle 10g › erro banco Oracle 10g
Certamente o processo que você executou deu lock em uma tabela ou registro que tentou ser atualizado por outro processo.
Existem diversas formas de você encontrar quem está prendendo as referidas linhas, a mais simples é consultando a v$lock
Segue uma das muitas consultas que te podem auxiliar :
Select s.sid, s.serial#, o.owner, s.lockwait, s.username, s.osuser, s.terminal, s.status, l.id2, decode (NVL (l.id2, 0), 0, o.object_name, 'Trans-' || to_char (l.id1)) object_name, decode (NVL (l.type, '.'), 'BL', 'Buffer hash table instance', 'CF', 'Control file schema global enqueue', 'CU', 'Cursor bind', 'CI', 'Cross-instance function invocation instance','DF', 'Data file instance', 'JQ', 'Job queue', 'DL', 'Direct loader parallel index create', 'TX', 'Transaction enqueue', 'UL', 'User supplied', 'DM', 'Mount/startup db primary/secondary instance', 'DR', 'Distributed recovery process', 'DX', 'Distributed transaction entry', 'TM', 'DML enqueue', l.type) type, decode (NVL (l.lmode, 0), 0, '--Waiting--', 1, 'Null', 2, 'Row Share', 3, 'Row Excl', 4, 'Share', 5, 'Sha Row Exc', 6, 'Exclusive', 'Other') "Lock Mode", decode (NVL (l.request, 0), 0, ' - ', 1, 'Null', 2, 'Row Share', 3, 'Row Excl', 4, 'Share', 5, 'Sha Row Exc', 6, 'Exclusive', 'Other') "Req Mode"
From v$lock l, v$session s, dba_objects o
Where s.sid = l.sid (+)
and l.id1 = o.object_id (+)
and s.username is not null
Order by l.id2, s.sid