• Skip to main content
  • Skip to primary sidebar

Ravi Shankar

Tweaking Apps

  • About
  • Portfolio
  • Privacy Policy
You are here: Home / Technical / How to find/kill the locked objects in an oracle database

How to find/kill the locked objects in an oracle database

March 5, 2008 By Ravi Shankar Leave a Comment

The below query can be used for determining the if any object locked in an oracle database.

select   c.owner,  c.object_name,  c.object_type,  b.sid,  b.serial#,
   b.status, b.osuser, b.machine
from
   v$locked_object a , v$session b, dba_objects c
where
   b.sid = a.session_id
and a.object_id = c.object_id;

And if you need to kill any session you can use the below query to do the same.

alter system kill session sid,serial;

Filed Under: Technical

Reader Interactions

Comments

  1. nilesh mehta says

    July 12, 2010 at 1:07 pm

    select c.owner, c.object_name, c.object_type, b.sid, b.serial#,
    b.status, b.osuser, b.machine
    from
    v$locked_object a , v$session b, dba_objects c

    these queries must be optimized as they may give performance issues.

    Reply
  2. Devanathan says

    November 10, 2010 at 12:12 pm

    Hi,

    Thanks

    Reply

Trackbacks

  1. Key posts in Techno Masala for March 2008 | Techno Masala says:
    April 3, 2008 at 1:32 am

    […] How to find/kill the locked objects in an oracle database […]

    Reply

Leave a Reply to Key posts in Techno Masala for March 2008 | Techno Masala Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

TwitterLinkedin

Recent Posts

  • Easy Split – Link Expense and User object – Flutter – Day 7
  • Easy Split – Adding Expense page – Flutter – Day 6
  • Easy Split – Showing multiple views – Flutter – Day 5
  • Easy Split – Add screen navigation – Flutter – Day 4
  • Easy Split – Add alert dialog – Flutter – Day 3

Copyright 2021 © rshankar.com