{"id":12,"date":"2011-10-27T20:31:00","date_gmt":"2011-10-27T20:31:00","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=12"},"modified":"2026-02-07T15:02:10","modified_gmt":"2026-02-07T21:02:10","slug":"tablespace-free-space-and-max-size","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2011\/12\/","title":{"rendered":"Tablespace Free Space and Max Size"},"content":{"rendered":"<div dir=\"ltr\">Earlier, provided a small script to find the maximum growable size of a tablespace&#8230; Here is little more comprehensive script that shows more tablespace space info. Current size, growable size based on the autoextensible data files, free space, biggest chunk&#8230;All size is in MB.<\/p>\n<pre class=\"lang:default decode:true  crayon-selected\">\nSELECT a.tablespace_name TSNAME,\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.growable)\/1048576) growable,\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.tots)\/1048576) Tot_Size,\n\u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.sumb)\/1048576) Tot_Free,\n\u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.sumb)*100\/sum(a.tots)) Pct_Free,\n\u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.largest)\/1048576) Large_Ext\nFROM \u00a0 (SELECt tablespace_name, 0 tots, SUM(bytes) sumb,\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0MAX(bytes) largest, 0 growable\n\u00a0 \u00a0 \u00a0 \u00a0 FROM \u00a0 dba_free_space a\n\u00a0 \u00a0 \u00a0 \u00a0 GROUP BY tablespace_name\n\u00a0 \u00a0 \u00a0 \u00a0 UNION\n\u00a0 \u00a0 \u00a0 \u00a0 SELECT tablespace_name, SUM(bytes) tots, 0, 0, \u00a0SUM (GREATEST (bytes, DECODE (autoextensible, 'YES', maxbytes, 0))) growable\n\u00a0 \u00a0 \u00a0 \u00a0 FROM \u00a0 dba_data_files\n\u00a0 \u00a0 \u00a0 \u00a0 GROUP BY tablespace_name\n\u00a0 \u00a0 \u00a0 \u00a0 UNION\n\u00a0 \u00a0 \u00a0 \u00a0 SELECT tablespace_name, SUM(bytes) tots, 0, 0, \u00a0SUM (GREATEST (bytes, DECODE (autoextensible, 'YES', maxbytes, 0))) growable\n\u00a0 \u00a0 \u00a0 \u00a0 FROM \u00a0 dba_temp_files\n\u00a0 \u00a0 \u00a0 \u00a0 GROUP BY tablespace_name) a, dba_tablespaces b\nWHERE b.tablespace_name = a.tablespace_name\nGROUP BY rollup(a.tablespace_name)\nORDER by a.tablespace_name<\/pre>\n<p>Enjoy!<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Earlier, provided a small script to find the maximum growable size of a tablespace&#8230; Here is little more comprehensive script that shows more tablespace space info. Current size, growable size based on the autoextensible data files, free space, biggest chunk&#8230;All size is in MB. SELECT a.tablespace_name TSNAME,\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ROUND(SUM(a.growable)\/1048576) growable,\u00a0 \u00a0 \u00a0 &#8230; <a title=\"Tablespace Free Space and Max Size\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2011\/12\/\" aria-label=\"Read more about Tablespace Free Space and Max Size\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[133],"tags":[141],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-oracledb","tag-tablespace"],"acf":[],"jetpack-related-posts":[{"id":17,"url":"https:\/\/bijoos.com\/oraclenotes\/2011\/17\/","url_meta":{"origin":12,"position":0},"title":"Query &#8211; Tablespace Max Size","author":"Biju","date":"September 27, 2011","format":false,"excerpt":"I sometimes see concerned emails from developers that they are running out of space in tablespace and the DBA need to do something immediately. The DBA will start wondering we have monitoring in place, then how come it did not catch an out of space situation, but a user\/developer did...For\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":8,"url":"https:\/\/bijoos.com\/oraclenotes\/2012\/8\/","url_meta":{"origin":12,"position":1},"title":"SYSAUX Tablespace Growth &#8211; Review and Fix","author":"Biju","date":"November 7, 2012","format":false,"excerpt":"Received an alert from one of the databases that SYSAUX tablespace is nearing its allocated 24GB space. 24GB is too much for SYSAUX, especially on a development database... so need to make sure the contents are reviewed before adding more space... Oracle10g+ versions have a view V$SYSAUX_OCCUPANTS, showing what components\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13,"url":"https:\/\/bijoos.com\/oraclenotes\/2011\/13\/","url_meta":{"origin":12,"position":2},"title":"SQL Script to find the top 50 tables by size","author":"Biju","date":"October 26, 2011","format":false,"excerpt":"Here is a SQL to identify the top 50 tables. When I say table, it could be a table, partitioned table or materialized view. Takes into consideration the indexes defined on the table and lob segments in the table, thus gives a complete picture of the table size. When you\u2026","rel":"","context":"In &quot;Scripts &amp; Tools&quot;","block_context":{"text":"Scripts &amp; Tools","link":"https:\/\/bijoos.com\/oraclenotes\/category\/scripts-tools\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":21,"url":"https:\/\/bijoos.com\/oraclenotes\/2011\/21\/","url_meta":{"origin":12,"position":3},"title":"Read Only Tables [Orig Published Apr 2000]","author":"Biju","date":"September 26, 2011","format":false,"excerpt":"In Oracle (all versions including 10g) you can make a tablespace read only, but not a single table. To make a table read only, you need to have that table in its own tablespace. If the tablespace has many tables, then you can either make all the tables read only\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":426,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/426\/","url_meta":{"origin":12,"position":4},"title":"Oracle Tidbits &#8211; June 2014","author":"Biju","date":"June 30, 2014","format":false,"excerpt":"\u201cOracle *daily* TidBits\u201d published at\u00a0https:\/\/www.facebook.com\/oraclenotes\u00a0on all weekdays\u00a0in June\u00a02014. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well\u2026 TidBit Topic In Oracle Database 12c, the Pre-Upgrade Information Tool script is preupgrd.sql (meaningfully named). Earlier release pre-upgrade\u2026","rel":"","context":"In &quot;TidBits &amp; Quick Tips&quot;","block_context":{"text":"TidBits &amp; Quick Tips","link":"https:\/\/bijoos.com\/oraclenotes\/category\/tidbits\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":166,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/166\/","url_meta":{"origin":12,"position":5},"title":"OracleDB12c New Feature: Misc Security Changes","author":"Biju","date":"July 11, 2013","format":false,"excerpt":"Security in Oracle12c Database is enhanced, in this blog will try to identify few difference you would see compared with 11gR2. SELECT ANY DICTIONARY privilege in 12c excludes access to the following tables with authentication information: DEFAULT_PWD$ ENC$ LINK$ USER$ USER_HISTORY$ XS$VERIFIERS AUDIT_TRAIL initialization parameter is set to DB by\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":1,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":2959,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/12\/revisions\/2959"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}