Oracle SQL To Get What Sessions Are Using an Object

The following query shows what Oracle sessions are using a given object.

select a.object, a.type, a.sid, b.serial#, b.username, b.osuser, b.program
  from v$access a, v$session b
 where a.sid = b.sid
   and a.object = 'XYZ'
 order by a.object

Leave a comment