How to check hung session in Oracle

Posted on 2007-08-04
Last Modified: 2013-12-18
I would like to know by using PLSQL how do identify which session are hung in Oracle? what should the query look like
Question by:motioneye
    1 Comment
    LVL 27

    Accepted Solution

    The following query will list the sessions hanging because of a lock on an object and the objects they are waiting for.

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
    Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now