There are three sessions . The first session has locked one table say emp. From the second session DML is fired on the same table . Now i want to monitor these locks from the third session which should show me the object that has been locked , the command fired causing the block and the user also .

I tried it by using v$session , v$lock and v$locked_object by which i could get the object and user but the command was showing as 0 in the monitoring session .Is there any way so that i can get the command in the monitoring session ?