查詢誰在使用 db-link
原文來自: Who’s using a database link?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | SELECT b.username, b.sid SID, b.serial# SERIAL#, b.osuser, b.process FROM v$session b, v$process d, v$sess_io e, v$timer WHERE b.sid = e.sid AND b.paddr = d.addr AND b.username IS NOT NULL -- added 0.0000001 to the division above to -- avoid divide by zero errors -- this is to show all sessions, whether they -- have done IO or not --and (e.consistent_Gets + e.block_Gets) > 0 -- uncomment to see only your own session --and userenv('SESSIONID') = b.audsid ORDER BY b.username, b.osuser, b.serial#, d.spid, b.process, b.status, e.consistent_Gets, e.block_Gets, e.Physical_reads; |