Advertisement
Thibstars

List Active Oracle Sessions

Apr 24th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.38 KB | None | 0 0
  1. SELECT
  2.        substr(a.spid,1,9) pid,
  3.        substr(b.sid,1,5) sid,
  4.        substr(b.serial#,1,5) ser#,
  5.        substr(b.machine,1,6) box,
  6.        substr(b.username,1,10) username,
  7. --       b.server,
  8.        substr(b.osuser,1,8) os_user,
  9.        substr(b.program,1,30) program
  10. FROM v$session b, v$process a
  11. WHERE
  12. b.paddr = a.addr AND b.STATUS='ACTIVE'
  13. AND TYPE='USER'
  14. ORDER BY spid;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement