{"id":7,"date":"2006-01-04T11:55:16","date_gmt":"2006-01-04T10:55:16","guid":{"rendered":"http:\/\/bar-solutions.com\/wordpress\/2006\/01\/04\/shrinking-tablespaces\/"},"modified":"2006-01-05T09:49:04","modified_gmt":"2006-01-05T08:49:04","slug":"shrinking-tablespaces","status":"publish","type":"post","link":"https:\/\/blog.bar-solutions.com\/?p=7","title":{"rendered":"Shrinking tablespaces"},"content":{"rendered":"<p>As you might know, Oracle uses tablespaces to store the tables and the data within them. If you drop tables and\/or users, the tablespace is <strong>not<\/strong> automagically shrunk to it&#8217;s minimal size. While playing around with my local database, I imported a lot of (big) tables. I wanted to reload a schema, but before I did that, I wanted to shrink my tablespace to it&#8217;s minimal size. I could of course do this using the Enterprise Manager Console, but that would mean shrinking by trial and error. However, I found a script (<a title=\"How to Shrink Tablespace\" href=\"http:\/\/www.dbaoncall.net\/references\/ht_shrink_ts.html\" target=\"_blank\">via<\/a>) that checks the minimal size of my tablespace and then generates a statement to shrink the tablespace to this minimal size. For your convenience I have copied the script so you can download\u00a0it\u00a0<a id=\"p8\" href=\"http:\/\/bar-solutions.com\/wordpress\/wp-content\/uploads\/2006\/01\/gen_shrink_ts.zip\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you might know, Oracle uses tablespaces to store the tables and the data within them. If you drop tables and\/or users, the tablespace is not automagically shrunk to it&#8217;s minimal size. While playing around with my local database, I imported a lot of (big) tables. I wanted to reload a schema, but before I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,9],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-oracle","category-sql"],"_links":{"self":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":0,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bar-solutions.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}