Skip to content

Instantly share code, notes, and snippets.

@katjunior
Created September 18, 2013 15:59
Show Gist options
  • Save katjunior/6611347 to your computer and use it in GitHub Desktop.
Save katjunior/6611347 to your computer and use it in GitHub Desktop.
Oracle - Select Process ID
select d.sid,d.serial#,b.spid,d.status,decode(a.block,1,'SIM',0,'não') BLOCK,
c.object_name,d.osuser,d.schemaname,d.program
from v$lock a,dba_objects c, v$session d, v$process b
where a.sid=d.sid and
d.paddr=b.addr
and a.id1=c.object_id(+)
and d.osuser is not null
and d.schemaname <> 'SYS'
order by 1,6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment