i want to monitor ROacle locks. More specifically i want to monitor if any session is waiting longer than 3 minutes. HOw can i set such an alarm? OR better yet what is the best way to monitor this type of issue. I know i cna run a SQL query like this to get my answer but is there a way besides the database query monitor.
select 'Count' as PK1,count(1) from gv$lock where request > 0 and ctime > 200