{"id":163,"date":"2024-01-23T14:02:05","date_gmt":"2024-01-23T12:02:05","guid":{"rendered":"http:\/\/130.61.57.200\/?p=163"},"modified":"2024-01-23T14:08:41","modified_gmt":"2024-01-23T12:08:41","slug":"create-awr-reports","status":"publish","type":"post","link":"http:\/\/130.61.57.200\/index.php\/2024\/01\/23\/create-awr-reports\/","title":{"rendered":"Create AWR Reports"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To create AWR reports based on the automated metrics gathered:<br>Connect to the correct Pluggable:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>select * from v$pdbs;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Find the dbid:<br><code>select * from v$database;&lt;br&gt;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to create manually a AWR snapshot use the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>select sys.dbms_workload_repository.create_snapshot(&#039;ALL&#039;) from dual;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Find the snapshot ids fom the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>select dbid,instance_number,snap_id,to_char(BEGIN_INTERVAL_TIME,&#039;dd\/mm\/yyyy hh24:mi;ss&#039;) startT,to_char(END_INTERVAL_TIME,&#039;dd\/mm\/yyyy hh24:mi:ss&#039;) endT&lt;br&gt;from DBA_HIST_SNAPSHOT where dbid=(select dbid from v$database)&lt;br&gt;order by BEGIN_INTERVAL_TIME desc;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following statement produces a HTML output of the AWR Report for specific snapshot ids on a RAC:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>SELECT output FROM TABLE&lt;br&gt;(dbms_workload_repository.awr_global_report_html&lt;br&gt;(l_dbid=&gt; &lt;DBID&gt;, --dbid select DBID from v$database&lt;br&gt;l_inst_num =&gt; &#039;1,2&#039;, --instance single instance=1&lt;br&gt;l_bid =&gt; &lt;SNAPID&gt; ,--begin snap&lt;br&gt;l_eid =&gt;&lt;SNAPID&gt;, -- end snap&lt;br&gt;l_options =&gt; null )&lt;br&gt;);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following statement produces a HTML output for Active Session History (ASH):<\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-1f26014c wp-block-group-is-layout-flex\">\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\"><code>SELECT output FROM TABLE ( dbms_workload_repository.ASH_GLOBAL_REPORT_HTML( l_dbid =&gt; &lt;DBID&gt;,&lt;br&gt;l_inst_num =&gt; null,&lt;br&gt;l_btime =&gt; to_date(&#039;09\/09\/2021 08:20:00&#039;,&#039;dd\/mm\/yyyy hh24:mi:ss&#039;),&lt;br&gt;l_etime =&gt; to_date(&#039;09\/09\/2021 08:40:00&#039;,&#039;dd\/mm\/yyyy hh24:mi:ss&#039;)--,&lt;br&gt;)) ;<\/code><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Finally the following script can be executed as oracle OS user to produce ADDM reports:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>@?\/rdbms\/admin\/addmrpt.sql<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To create AWR reports based on the automated metrics gathered:Connect to the correct Pluggable: select * from v$pdbs; Find the dbid:select * from v$database;&lt;br&gt; If you want to create manually a AWR snapshot use the following: select sys.dbms_workload_repository.create_snapshot(&#039;ALL&#039;) from dual; Find the snapshot ids fom the following: select dbid,instance_number,snap_id,to_char(BEGIN_INTERVAL_TIME,&#039;dd\/mm\/yyyy hh24:mi;ss&#039;) startT,to_char(END_INTERVAL_TIME,&#039;dd\/mm\/yyyy hh24:mi:ss&#039;) endT&lt;br&gt;from DBA_HIST_SNAPSHOT where [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":106,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[59,58,55,56,57],"class_list":["post-163","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-addm","tag-ash","tag-awr","tag-monitoring","tag-tuning"],"blocksy_meta":[],"_links":{"self":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":3,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":167,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/posts\/163\/revisions\/167"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media\/106"}],"wp:attachment":[{"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.57.200\/index.php\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}