Finding locked objects
Recently I was faced the following.
The tables were getting locked and the application started to hang. So I did,
select sid from v$lock where lmode=6;
and it returned 1 row. Then I did
select * from v$lock where sid = <sid>;
it returned 11 records and one of them was lmode 6 and reset where lmode 3.Then I did
select * from v$locked_object where session_id = <sid>;
It returned 10 records all of them were lmode 3 and lmode 6 was missing. So I couldn't figure out the object which was locked in lmode 6.
Then I thought it might be cascade, locking objects in the background. So I the run the following SQL to look for ON DELETE CASCADE