{"id":1062,"date":"2006-08-21T12:00:00","date_gmt":"2006-08-21T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1062"},"modified":"2006-08-21T12:00:00","modified_gmt":"2006-08-21T12:00:00","slug":"resumable-storage-allocation","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2006\/08\/21\/resumable-storage-allocation\/","title":{"rendered":"Resumable Storage Allocation"},"content":{"rendered":"<p>At the moment I&#8217;m writing a short 9i\/10g New Features seminar for the developers at work. The idea is to run through lots of new features very quickly to see if anything lights their candle and they can then go off and investigate further afterwards.<\/p>\n<p>It occurred to me while I was putting some slides together that 9i&#8217;s resumable storage allocation feature is under-used so I thought I&#8217;d blog about it here. It&#8217;s amazing how many times this facility would have helped us avoid big problems at work.<\/p>\n<p>I also realised, and not for the first time, that what differentiates the best people I&#8217;ve worked alongside from the rest is that they realise how easy it is to knock up a quick demonstration of a feature to make sure it works as expected and show it to others. I wasn&#8217;t sure of how the contents of one of the views would look so I tried it out. Of course, you need a play database for this (but everyone should have at least one of those kicking around) but this entire demo took 10 minutes to put together, even allowing for initial head-scratching, typos etc. I&#8217;d far rather spend 10 minutes playing than asking different people and surfing the net. The hands-on aspect makes the information &#8216;stick&#8217; better and you might come across quirks you weren&#8217;t expecting. Anyway, here&#8217;s the example<\/p>\n<pre><code>TEST1020&gt; create tablespace resumable_test<br\/>  2  datafile '\/u01\/oradata\/TEST1020\/resumable_test01.dbf' size 1m;<br\/><br\/>Tablespace created.<br\/><br\/>TEST1020&gt; alter user testuser quota unlimited on resumable_test;<br\/><br\/>User altered.<br\/><br\/>TEST1020&gt; grant resumable to testuser;<br\/><br\/>Grant succeeded.<br\/><br\/>TEST1020&gt; connect testuser\/testuser<br\/>Connected.<br\/>TEST1020&gt; create table res tablespace resumable_test as select * from all_objects;<br\/><br\/>Table created.<br\/><br\/>TEST1020&gt; select segment_name, bytes from user_segments where segment_name = 'RES';<br\/><br\/>SEGMENT_NAME              BYTES<br\/>-------------------- ----------<br\/>RES                      524288<br\/><br\/>TEST1020&gt; alter session enable resumable;<br\/><br\/>Session altered.<br\/><br\/>TEST1020&gt; insert into res select * from res;<\/code><\/pre>\n<p>This session will hang because it&#8217;s filled up the tablespace. You can see this in another DBA session<\/p>\n<pre><code>TEST1020&gt; select user_id, status, sql_text, error_msg<br\/>  2  from dba_resumable<br\/>  3  \/<br\/><br\/>   USER_ID STATUS<br\/>---------- ---------<br\/>SQL_TEXT<br\/>--------------------------------------------------------------------------------<br\/>ERROR_MSG<br\/>--------------------------------------------------------------------------------<br\/>        27 SUSPENDED<br\/>insert into res select * from res<br\/>ORA-01653: unable to extend table TESTUSER.RES by 8 in tablespace RESUMABLE_TEST<br\/><br\/>TEST1020&gt; alter database datafile '\/u01\/oradata\/TEST1020\/resumable_test01.dbf' resize 10m;<br\/><br\/>Database altered.<br\/><br\/>TEST1020&gt; select user_id, status, sql_text, error_msg<br\/>  2  from dba_resumable<br\/>  3  \/<br\/><br\/>   USER_ID STATUS<br\/>---------- ---------<br\/>SQL_TEXT<br\/>--------------------------------------------------------------------------------<br\/>ERROR_MSG<br\/>--------------------------------------------------------------------------------<br\/>        27 NORMAL<\/code><\/pre>\n<p>\nAnd if we go back and look at the TESTUSER session, the statement has completed<\/p>\n<pre><code>TEST1020&gt; insert into res select * from res;<br\/><br\/>4490 rows created.<br\/><br\/>TEST1020&gt;<\/code><\/pre>\n<p>\nFull documentation for 9i is <a href=\"http:\/\/download-uk.oracle.com\/docs\/cd\/B10501_01\/server.920\/a96521\/schema.htm#11390\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At the moment I&#8217;m writing a short 9i\/10g New Features seminar for the developers at work. The idea is to run through lots of new features very quickly to see if anything lights their candle and they can then go off and investigate further afterwards. It occurred to me while I was putting some slides&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2006\/08\/21\/resumable-storage-allocation\/\">Continue reading <span class=\"screen-reader-text\">Resumable Storage Allocation<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1062","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1294,"url":"http:\/\/orcldoug.com\/blog\/2007\/07\/12\/oracle-11g-total-recall\/","url_meta":{"origin":1062,"position":0},"title":"Oracle 11g &#8211; Total Recall","date":"July 12, 2007","format":false,"excerpt":"I suppose most readers will be aware that Oracle held a big launch for 11g yesterday, including the release of various technical docs at OTN. I've only managed a quick scan because I'm up to my eyeballs in some internal ASH\/AWR training I'm giving later today, but what particularly interested\u2026","rel":"","context":"With 5 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":826,"url":"http:\/\/orcldoug.com\/blog\/2006\/03\/26\/yapt\/","url_meta":{"origin":1062,"position":1},"title":"YAPT","date":"March 26, 2006","format":false,"excerpt":"Yet Another PX Test (if only to give readers something different to comment on)Jonathan Lewis had suggested larger extents and freelist segment space management (instead of ASSM) could benefit the PX tests I've been running. I'm pretty sure it was Jeff Moss that suggested bigger blocks would be more appropriate\u2026","rel":"","context":"With 2 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1371,"url":"http:\/\/orcldoug.com\/blog\/2007\/12\/24\/the-reality-gap-4-its-never-the-san\/","url_meta":{"origin":1062,"position":2},"title":"The Reality Gap (4) &#8211; It&#8217;s never the SAN","date":"December 24, 2007","format":false,"excerpt":"I've left one of my favourite topics for the penultimate episode of this mini-series. The more sites you work at and the more performance problems you work on, the more you begin to learn the one essential truth of modern system architecture. It's never the SAN. Here's a true story.\u2026","rel":"","context":"With 11 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1515,"url":"http:\/\/orcldoug.com\/blog\/2009\/09\/01\/11-2-release\/","url_meta":{"origin":1062,"position":3},"title":"11.2 Release","date":"September 1, 2009","format":false,"excerpt":"Some features in this post require a Diagnostics Pack license. I noticed my Netvibes home page light up today with the release of 11.2 on OTN (Greg's is just one of a bunch of posts) - official home page here.More important to me was the documentation and there were two\u2026","rel":"","context":"With 27 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1714,"url":"http:\/\/orcldoug.com\/blog\/2014\/01\/29\/recurring-conversations-incremental-statistics-part-1\/","url_meta":{"origin":1062,"position":4},"title":"Recurring Conversations \u2013 Incremental Statistics (Part 1)","date":"January 29, 2014","format":false,"excerpt":"When I first started blogging, most of the material came from issues that I'd run into and how they were solved but, as I've spent most of the last 7 months not logging in to anything much ;-), it occurred to me that another area which I haven't used for\u2026","rel":"","context":"With 1 comment","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1376,"url":"http:\/\/orcldoug.com\/blog\/2008\/01\/12\/8-useful-technical-posts\/","url_meta":{"origin":1062,"position":5},"title":"8 Useful Technical Posts &#8230;","date":"January 12, 2008","format":false,"excerpt":"That number in the title is not a joke or an attempt to drag out the pain. However, OraNA has been flooded with '8' posts this week, so I thought it worthwhile to post a quick list of some really nice technical posts I've noticed over the last couple of\u2026","rel":"","context":"With 2 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/comments?post=1062"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1062\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1062"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}