List locked objects


SELECT VLO.OS_USER_NAME               “OS USERNAME”,
VLO.ORACLE_USERNAME            “DB USER”,
VP.SPID                        “SPID”,
AO.OWNER                       “OWNER”,
AO.OBJECT_NAME                 “OBJECT LOCKED”,
AO.OBJECT_TYPE,
DECODE (VLO.LOCKED_MODE, 1, ‘NO LOCK’,
2, ‘ROW SHARE’,
3, ‘ROW EXCLUSIVE’,
4, ‘SHARE’,
5, ‘SHARE ROW EXCL’,
6, ‘EXCLUSIVE’,
NULL) “MODE OF LOCK”,
VS.STATUS                      “CURRENT STATUS”
FROM   V$LOCKED_OBJECT VLO,
ALL_OBJECTS AO,
V$SESSION VS,
V$PROCESS VP
WHERE  VLO.OBJECT_ID = AO.OBJECT_ID
AND VS.STATUS <> ‘KILLED’
AND VLO.SESSION_ID = VS.SID
AND VS.PADDR = VP.ADDR;

Advertisements