{"id":6131,"date":"2019-02-22T13:59:22","date_gmt":"2019-02-22T13:59:22","guid":{"rendered":"https:\/\/ittutorial.org\/?p=6131"},"modified":"2019-11-26T11:27:31","modified_gmt":"2019-11-26T11:27:31","slug":"oracle-database-wait-event-scripts-2","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/oracle-database-wait-event-scripts-2\/","title":{"rendered":"Oracle Database Wait Event Scripts -2"},"content":{"rendered":"<p>Hi,<\/p>\n<p>When you take many complaints from customer about slowness of database, you should check Oracle database wait events.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6133 aligncenter\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/waitevent-1.jpg\" alt=\"\" width=\"650\" height=\"340\" srcset=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/waitevent-1.jpg 650w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/waitevent-1-300x157.jpg 300w, https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/waitevent-1-390x205.jpg 390w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n\n<p>&nbsp;<\/p>\n<p>If you don&#8217;t know What are the Wait Events in the Oracle Database and their solution, you can read the following article.<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"MkKA307QEo\"><p><a href=\"https:\/\/ittutorial.org\/wait-events-oracle-database-and-their-solutions\/\">Oracle Wait Events and Their Solutions in Oracle Database<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Oracle Wait Events and Their Solutions in Oracle Database&#8221; &#8212; IT Tutorial\" src=\"https:\/\/ittutorial.org\/wait-events-oracle-database-and-their-solutions\/embed\/#?secret=g7P1zvSTRw#?secret=MkKA307QEo\" data-secret=\"MkKA307QEo\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>You can check Top Oracle database wait events at specific intervals.<\/p>\n<p>You should type date and SNAP_ID<\/p>\n<pre>select snap_id,begin_interval_time,end_interval_time\r\nfrom dba_hist_snapshot\r\nwhere to_char(begin_interval_time,'DD-MON-YYYY')='20-FEB-2019'\r\nand EXTRACT(HOUR FROM begin_interval_time) between 8 and 10;\r\n\r\nselect * from (\r\nselect active_session_history.event,\r\nsum(active_session_history.wait_time +\r\nactive_session_history.time_waited) ttl_wait_time\r\nfrom dba_hist_active_sess_history active_session_history\r\nwhere event is not null\r\nand SNAP_ID between 34411 and 34431\r\ngroup by active_session_history.event\r\norder by 2 desc)\r\nwhere rownum&lt;10;<\/pre>\n<p>&nbsp;<\/p>\n\n<p>Query result should be such as follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6132\" src=\"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/wait-event.png\" alt=\"\" width=\"263\" height=\"220\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h5><span style=\"color: #ff0000;\">Do you want to learn Oracle Database Performance Tuning detailed, then read the following articles.<\/span><\/h5>\n<p><a href=\"https:\/\/ittutorial.org\/oracle-database-performance-tuning-tutorial-12-what-is-the-automatic-sql-tuning-and-how-to-automated-sql-tuning\/\">https:\/\/ittutorial.org\/oracle-database-performance-tuning-tutorial-12-what-is-the-automatic-sql-tuning-and-how-to-automated-sql-tuning\/\u00a0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, When you take many complaints from customer about slowness of database, you should check Oracle database wait events. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":6133,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1994,2110,5085],"tags":[2105,2106,2107,2108,1031,1153,2091,2092,2112,2114,2099,2118,2117,2116,2113,2115],"class_list":["post-6131","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-oracle","category-oracle-dba-scripts","category-performance-tuning","tag-dba_hist_active_sess_history","tag-dba_objects","tag-gvlock","tag-gvsession","tag-mehmet-salih-deveci","tag-oracle-19c","tag-oracle-19c-cloud-database","tag-oracle-19c-error-codes","tag-oracle-dba-scripts","tag-oracle-monitoring-scripts","tag-oracle-scripts","tag-oracle-wait-event","tag-oracle-wait-event-script","tag-oracle-wait-event-scripts","tag-useful-oracle-scripts","tag-wait-event-scripts"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2019\/03\/waitevent-1.jpg","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/6131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=6131"}],"version-history":[{"count":4,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/6131\/revisions"}],"predecessor-version":[{"id":12770,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/6131\/revisions\/12770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/6133"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=6131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=6131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=6131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}