关于如何查找本台Database那个session正在通过DB_LINK连接着其他Database,通过在itpub上请教大家,总结出如下SQL,如果那位读者有不同见解,请提出。
SELECT distinct /*+ ROWID(A) ROWID(B) */
a.SID, a.username, a.terminal, a.program
FROM v$session a, v$session_event b
WHERE a.SID = b.SID AND b.event LIKE '%dblink%';
续:后来发现,以上语句查出来的是这个Session曾经用过DB_LINK,不一定是正在使用DB_LINK.