{"id":1593,"date":"2024-05-08T15:02:02","date_gmt":"2024-05-08T07:02:02","guid":{"rendered":"http:\/\/oneai.eu.org\/?p=1593"},"modified":"2024-05-08T15:02:02","modified_gmt":"2024-05-08T07:02:02","slug":"%e6%9f%a5%e7%9c%8b%e6%b8%b8%e6%a0%87%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=1593","title":{"rendered":"\u67e5\u770b\u6e38\u6807\u65b9\u6cd5"},"content":{"rendered":"<pre><code class=\"language-sql\">1\u3001--\u7edf\u8ba1\u6e38\u6807\u603b\u6570\nselect o.sid, osuser, PROCESS,PROGRAM, count(*) num_curs\nfrom v$open_cursor o, v$session s\nwhere osuser='lzm' and user_name = 'ZHZW' and o.sid=s.sid \ngroup by o.sid, osuser, PROCESS,PROGRAM\norder by  num_curs desc\n\n2\u3001--\u67e5\u770b\u67d0\u4e2a\u7a0b\u5e8f\u7684\u6240\u6709\u6e38\u6807\u8bed\u53e5\nselect SQL_TEXT\nfrom v$open_cursor o, v$session s\nwhere user_name = 'ZHZW' and o.sid=s.sid \nand PROCESS='2146392'\n\n3\u3001--\u77e5\u9053\u67d0\u4e00\u7279\u5b9asql\u67e5\u8be2\u6253\u5f00\u7684\u6e38\u6807\u6570\nselect a.sql_text, a.sql_id, b.count, to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') from v$sqlarea a, \n(select sql_id, count(*) count from v$open_cursor group by sql_id) b \nwhere a.sql_text like 'select integralcyc%' and a.sql_id = b.sql_id;\n\n4\u3001\u6839\u636e\u7a0b\u5e8f\u540d\u67e5\u8be2\u6253\u5f00\u7684\u6e38\u6807\u6570\nselect p.SQL_TEXT,count(*) ,sysdate from v$session s ,V$OPEN_CURSOR p \nwhere s.SID=p.SID and s.program like'Date%' group by p.SQL_TEXT order by p.SQL_TEXT;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001&#8211;\u7edf\u8ba1\u6e38\u6807\u603b\u6570 select o.sid, osuser, PROCESS,PROGRAM, count(*) num_curs from v$open_cursor o, v$session s where osuser=&#8217;lzm&#8217; and user_name = &#8216;ZHZW&#8217; and o.sid=s.sid group by o.sid, osuser, PROCESS,PROGRAM order by num_curs desc 2\u3001&#8211;\u67e5\u770b\u67d0\u4e2a\u7a0b\u5e8f\u7684\u6240\u6709\u6e38\u6807\u8bed\u53e5 select SQL_TEXT from v$open_cursor o, v$session s where user_name = &#8216;ZHZW&#8217; and o.sid=s.sid and PROCESS=&#8217;2146392&#8242; 3\u3001&#8211;\u77e5\u9053\u67d0\u4e00\u7279\u5b9asql\u67e5\u8be2\u6253\u5f00\u7684\u6e38\u6807\u6570 select a.sql_text, a.sql_id, b.count, to_char(sysdate, &#8216;YYYY-MM-DD HH24:MI:SS&#8217;) from v$sqlarea a, (select sql_id, count(*) count from v$open_cursor group by sql_id) b where a.sql_text like &#8216;select integralcyc%&#8217; and a.sql_id = b.sql_id; 4\u3001\u6839\u636e\u7a0b\u5e8f\u540d\u67e5\u8be2\u6253\u5f00\u7684\u6e38\u6807\u6570 select p.SQL_TEXT,count(*) ,sysdate from v$session s ,V$OPEN_CURSOR p where s.SID=p.SID and s.program like&#8217;Date%&#8217; group by p.SQL_TEXT order by p.SQL_TEXT;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[88,82,101,80],"tags":[],"class_list":["post-1593","post","type-post","status-publish","format-standard","hentry","category-oracle","category-82","category-101","category-80"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1593"}],"version-history":[{"count":1,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1593\/revisions"}],"predecessor-version":[{"id":1594,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1593\/revisions\/1594"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}