Skip to content

Instantly share code, notes, and snippets.

@wingkwong
Created December 4, 2019 10:58
Show Gist options
  • Save wingkwong/3ed0c7e8e3528da9b8070429d72eca29 to your computer and use it in GitHub Desktop.
Save wingkwong/3ed0c7e8e3528da9b8070429d72eca29 to your computer and use it in GitHub Desktop.
Query locked objects in 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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment