{"id":359,"date":"2019-12-17T07:25:40","date_gmt":"2019-12-16T21:25:40","guid":{"rendered":"http:\/\/www.mrmarkyoung.com\/oracle\/?p=359"},"modified":"2019-12-17T07:25:40","modified_gmt":"2019-12-16T21:25:40","slug":"database-growth-oem","status":"publish","type":"post","link":"http:\/\/www.mrmarkyoung.com\/oracle\/2019\/12\/17\/database-growth-oem\/","title":{"rendered":"Database Growth &#8211; OEM"},"content":{"rendered":"\n<p>There are many ways to calculate database growth and I&#8217;ve certainly had a few, but this is probably the most accurate so far..<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ELECT A1.rollup_timestamp,\n  A1.average as \"MAX\",\n  A2.ROLLUP_TIMESTAMP,\n  A2.AVERAGE AS \"MIN\",\n  a1.average-a2.average as \"Total Growth GB\"\nFROM mgmt$metric_daily A1, MGMT$METRIC_DAILY A2\nWHERE A1.TARGET_NAME=A2.TARGET_NAME AND A1.COLUMN_LABEL=a2.column_label \nAND  A1.target_name   ='DB_NAME'\nAND A1.column_label    ='Used Space(GB)'\nAND A1.rollup_timestamp=  (SELECT MAX(rollup_timestamp) FROM mgmt$metric_daily where target_name='DB_NAME' and column_label='Used Space(GB)')\nAND A2.rollup_timestamp=  (SELECT min(rollup_timestamp) FROM mgmt$metric_daily where target_name='DB_NAME' and column_label='Used Space(GB)');<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are many ways to calculate database growth and I&#8217;ve certainly had a few, but this is probably the most accurate so far..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,4],"tags":[],"class_list":["post-359","post","type-post","status-publish","format-standard","hentry","category-enterprise-manager","category-oracle-database"],"_links":{"self":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":1,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":360,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/posts\/359\/revisions\/360"}],"wp:attachment":[{"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrmarkyoung.com\/oracle\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}