How to detect the session who locks other sessions?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: How to detect the session who locks other sessions?

  1. #1
    Join Date
    Aug 2002
    Posts
    8

    I have multiple dbms jobs running and end users are modifying data at the same time. Sometime it looks like a session is locking some other sessions. Does someone have a sql statement to determin which session is locking the others?

    Thanks,

    YM

  2. #2
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    run ?/rdbms/admin/catblock.sql
    and then you can select from
    DBA_DML_LOCKS;
    DBA_DDL_LOCKS;
    DBA_BLOCKERS;

    steve
    I'm stmontgo and I approve of this message

  3. #3
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818
    Run the catblock utlity and then look at the tables dba_locks and dba_blockers.

    I also use ...

    select a.object_id,a.object_name,b.sid,b.serial#,b.username,c.os_user_name,c.locked_mode
    from dba_objects a,v$session b,v$locked_object c
    where a.object_id=c.object_id and
    b.sid=c.session_id
    /

  4. #4
    Join Date
    Aug 2002
    Posts
    8
    Thank you all very very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width