{"id":648,"date":"2012-01-07T22:10:26","date_gmt":"2012-01-07T14:10:26","guid":{"rendered":"http:\/\/j178.mtgbb.com\/?p=648"},"modified":"2012-01-07T22:10:26","modified_gmt":"2012-01-07T14:10:26","slug":"%e6%9f%a5%e8%a9%a2%e8%aa%b0%e5%9c%a8%e4%bd%bf%e7%94%a8-db-link","status":"publish","type":"post","link":"https:\/\/j178.mtgbb.com\/?p=648","title":{"rendered":"\u67e5\u8a62\u8ab0\u5728\u4f7f\u7528 db-link"},"content":{"rendered":"<p>\u539f\u6587\u4f86\u81ea: <a href=\"http:\/\/jkstill.blogspot.com\/2010\/03\/whos-using-database-link.html\">Who&#8217;s using a database link?<\/a><\/p>\n<pre lang=\"oracle8\" line=\"1\">\r\nselect\r\n   b.username,\r\n   b.sid SID,\r\n   b.serial# SERIAL#,\r\n   b.osuser,\r\n   b.process\r\nfrom v$session b,\r\n     v$process d,\r\n     v$sess_io e,\r\n     v$timer\r\nwhere\r\n   b.sid = e.sid\r\n   and  b.paddr = d.addr\r\n   and  b.username is not null\r\n   -- added 0.0000001 to the division above to\r\n   -- avoid divide by zero errors\r\n   -- this is to show all sessions, whether they\r\n   -- have done IO or not\r\n   --and  (e.consistent_Gets + e.block_Gets) > 0\r\n   -- uncomment to see only your own session\r\n   --and userenv('SESSIONID') = b.audsid\r\norder by\r\n         b.username,\r\n         b.osuser,\r\n         b.serial#,\r\n         d.spid,\r\n         b.process,\r\n         b.status,\r\n         e.consistent_Gets,\r\n         e.block_Gets,\r\n         e.Physical_reads;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u4f86\u81ea: Who&#8217;s using a database link? select b.usern &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,12],"tags":[23,57],"class_list":["post-648","post","type-post","status-publish","format-standard","hentry","category-oracle-erp","category-database","tag-oracle-db","tag-oracle-erp"],"_links":{"self":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=648"}],"version-history":[{"count":0,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/648\/revisions"}],"wp:attachment":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}