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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s