Friday, October 9, 2009

enq: TM - contention

It took me a while to resolve this issue on my database. Every single resource on the Net pointed to "missing indexes on foreign key columns", but I found it was due to another session locking my database.

The following query gave me a list of blocking sessions. Once I killed those sessions,
"enq: TM - contention" went away.

Select v.sid,s.blocking_session, s.event, v.type,v.lmode,v.request,o.object_name, o.object_type
from v$lock v ,dba_objects o, v$session s
where v.id1 = o.object_id
and v.sid = s.sid
and owner ="Put_your_Owner_Name_Here"

No comments:

Post a Comment