{"id":18129,"date":"2019-04-17T09:37:14","date_gmt":"2019-04-17T12:37:14","guid":{"rendered":"https:\/\/orabr.com\/?p=18129"},"modified":"2019-04-17T09:43:58","modified_gmt":"2019-04-17T12:43:58","slug":"calcular-tamanhos-para-table-space","status":"publish","type":"post","link":"https:\/\/orabr.virttus.com\/?p=18129","title":{"rendered":"CALCULAR TAMANHOS PARA TABLE SPACE"},"content":{"rendered":"<HTML><HTML>\n<pre class=\"wp-block-code\"><code>\n\n\n\nSELECT df.tablespace_name \"Tablespace\"\n       ,totalusedspace \"Used MB\"\n       ,(df.totalspace - tu.totalusedspace) \"Free MB\"\n       ,df.totalspace \"Total MB\"\n       ,round(100 * ((df.totalspace - tu.totalusedspace) \/ df.totalspace)) \"Pct. Free\"\n       ,SYSDATE dateds\n  FROM (SELECT tablespace_name\n              ,round(SUM(bytes) \/ 1048576) TotalSpace\n          FROM dba_data_files\n         GROUP BY tablespace_name) df\n      ,(SELECT round(SUM(bytes) \/ (1024 * 1024)) totalusedspace\n              ,tablespace_name\n          FROM dba_segments\n         GROUP BY tablespace_name) tu\n WHERE df.tablespace_name = tu.tablespace_name\n   AND tu.tablespace_name = NVL(NULL, tu.tablespace_name) --TROCAR NULL PELO NOME DA TABLE_SPACE\n<\/code><\/pre>\n<\/HTML><\/HTML>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,122,126,138],"tags":[],"class_list":["post-18129","post","type-post","status-publish","format-standard","hentry","category-database","category-dba-atg-oracle","category-developer-tools","category-sql"],"_links":{"self":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/18129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18129"}],"version-history":[{"count":4,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/18129\/revisions"}],"predecessor-version":[{"id":18133,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/18129\/revisions\/18133"}],"wp:attachment":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}