{"id":11,"date":"2009-05-14T08:00:19","date_gmt":"2009-05-14T15:00:19","guid":{"rendered":"http:\/\/www.vinodsr.com\/myblog\/?p=11"},"modified":"2009-05-14T08:05:39","modified_gmt":"2009-05-14T15:05:39","slug":"how-to-track-queries-in-oracle","status":"publish","type":"post","link":"https:\/\/vinodsr.com\/myblog\/2009\/05\/how-to-track-queries-in-oracle\/","title":{"rendered":"How to track queries in oracle .."},"content":{"rendered":"<p>In Oracle there is a easy way to track the current queries processed by the database.<\/p>\n<p>Suppose you want to track the Insert queries in your DB .<\/p>\n<p>then for that use this query<\/p>\n<blockquote>\n<p style=\"text-align: left;\">select substr(sql_text,instr(sql_text,&#8217;INTO &#8220;&#8216;),30) table_name,<br \/>\nrows_processed,<br \/>\nround((sysdate-to_date(first_load_time,&#8217;yyyy-mm-dd hh24:mi:ss&#8217;))*24*60,1) minutes,<br \/>\ntrunc(rows_processed\/((sysdate-to_date(first_load_time,&#8217;yyyy-mm-dd hh24:mi:ss&#8217;))*24*60)) rows_per_min<br \/>\nfrom\u00a0\u00a0 sys.v_$sqlarea<br \/>\nwhere\u00a0 sql_text like &#8216;<span style=\"color: #0000ff;\"><strong>INSERT %INTO &#8220;%<\/strong><\/span>&#8216;<br \/>\nand\u00a0 command_type = 2<br \/>\nand\u00a0 open_versions &gt; 0;<\/p><\/blockquote>\n<p style=\"text-align: left;\">Replace the text in blue color (&#8216;<span style=\"color: #0000ff;\"><strong>INSERT %INTO &#8220;%<\/strong><\/span>&#8216;) According to your purpose<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Oracle there is a easy way to track the current queries processed by the database. Suppose you want to track the Insert queries in&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[45],"class_list":["post-11","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle"],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":4,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/posts\/11\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vinodsr.com\/myblog\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}