<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Shrink Tablespace</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 22 May 2013 12:40:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Christopher Osborne</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-54171</link>
		<dc:creator><![CDATA[Christopher Osborne]]></dc:creator>
		<pubDate>Mon, 18 Mar 2013 14:16:11 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-54171</guid>
		<description><![CDATA[&quot;Moving lob segments is a pain.&quot;

This is something of an understatement. :-)]]></description>
		<content:encoded><![CDATA[<p>&#8220;Moving lob segments is a pain.&#8221;</p>
<p>This is something of an understatement. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Viewing Figures &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-51951</link>
		<dc:creator><![CDATA[Viewing Figures &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 10 Dec 2012 10:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-51951</guid>
		<description><![CDATA[[...] Shrink Tablespace [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Shrink Tablespace [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-47699</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 03 Jul 2012 21:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-47699</guid>
		<description><![CDATA[Ranjith,

When solving problems you need to examine the evidence with care, and report your observations with extreme care.
I don&#039;t seen any reference to a thing called &quot;free_space_block&quot; in my article - so how am I supposed to interpret your question ? 
I will take a guess (based partly on your later comment that there is a 1MB free extent at the end of the file) that you have some object(s) in the user_recyclebin or dba_recyclebin that you have not yet purged.

Show us the last few lines of the report for each file in the tablespace, and I may produce another guess. 
You might also tell us which version of Oracle, and check that the block size is  8KB.]]></description>
		<content:encoded><![CDATA[<p>Ranjith,</p>
<p>When solving problems you need to examine the evidence with care, and report your observations with extreme care.<br />
I don&#8217;t seen any reference to a thing called &#8220;free_space_block&#8221; in my article &#8211; so how am I supposed to interpret your question ?<br />
I will take a guess (based partly on your later comment that there is a 1MB free extent at the end of the file) that you have some object(s) in the user_recyclebin or dba_recyclebin that you have not yet purged.</p>
<p>Show us the last few lines of the report for each file in the tablespace, and I may produce another guess.<br />
You might also tell us which version of Oracle, and check that the block size is  8KB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranjith</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-47404</link>
		<dc:creator><![CDATA[Ranjith]]></dc:creator>
		<pubDate>Wed, 27 Jun 2012 16:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-47404</guid>
		<description><![CDATA[Also I added up the space in dba_extents and dba_free_space for that particular database , it is 1 MB less than the total space shown allocated in dba_data_files for that tablespace .And this 1 MB appears to be at the end of the data file .]]></description>
		<content:encoded><![CDATA[<p>Also I added up the space in dba_extents and dba_free_space for that particular database , it is 1 MB less than the total space shown allocated in dba_data_files for that tablespace .And this 1 MB appears to be at the end of the data file .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranjith</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-47398</link>
		<dc:creator><![CDATA[Ranjith]]></dc:creator>
		<pubDate>Wed, 27 Jun 2012 05:25:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-47398</guid>
		<description><![CDATA[Thanks for the article Btw ...]]></description>
		<content:encoded><![CDATA[<p>Thanks for the article Btw &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ranjith</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-47397</link>
		<dc:creator><![CDATA[Ranjith]]></dc:creator>
		<pubDate>Wed, 27 Jun 2012 05:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-47397</guid>
		<description><![CDATA[Hi Jonathan , 

I tried the above steps , I have my last free_space_block marked as 151672  and my dba_extents gives the maximum database block as  120448 .Now as you suggested I tried to reclaim (151672 -120448)* 8 which comes to around 243 MB - which from the total 1184 MB comes to about 942 MB . So I tried the following :- 

alter database datafile 8 resize 942M 

I get error :- ORA-03297: file contains used data beyond requested RESIZE value

So I made it 

alter database datafile 8 resize 980M 

Still I get the same error .So for testing purposes I made it 

alter database datafile 8 resize 1184M same error .

I am confused since dba_extents is not showing anything beyond 120448 block number and dba_free_extents is showing free blocks till 151672 .What could be the reason ?]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan , </p>
<p>I tried the above steps , I have my last free_space_block marked as 151672  and my dba_extents gives the maximum database block as  120448 .Now as you suggested I tried to reclaim (151672 -120448)* 8 which comes to around 243 MB &#8211; which from the total 1184 MB comes to about 942 MB . So I tried the following :- </p>
<p>alter database datafile 8 resize 942M </p>
<p>I get error :- ORA-03297: file contains used data beyond requested RESIZE value</p>
<p>So I made it </p>
<p>alter database datafile 8 resize 980M </p>
<p>Still I get the same error .So for testing purposes I made it </p>
<p>alter database datafile 8 resize 1184M same error .</p>
<p>I am confused since dba_extents is not showing anything beyond 120448 block number and dba_free_extents is showing free blocks till 151672 .What could be the reason ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-44725</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 10:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-44725</guid>
		<description><![CDATA[MF,

You might want to check the recyclebin.
Objects which have been dropped but kept in the recyclebin appear in dba_free_space as free.

I&#039;ve added an update to the article to point this out.
]]></description>
		<content:encoded><![CDATA[<p>MF,</p>
<p>You might want to check the recyclebin.<br />
Objects which have been dropped but kept in the recyclebin appear in dba_free_space as free.</p>
<p>I&#8217;ve added an update to the article to point this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MF</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-44709</link>
		<dc:creator><![CDATA[MF]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 14:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-44709</guid>
		<description><![CDATA[Good scripts Jonathan thanks.

One question - I have some blocks that are marked as &#039;free&#039; by your script but rebuilding Index or moving tables into the tablespace does not use them. I have 50% free in the tablespace but cannot move segments into these free blocks so cannot reduce the datafile.

e.g.

11                     250889                 385544                 free                           free 
...
11                     385673                 412936                 free                           free                                                                                                                                
...
11                     413065                 507912                 free                           free                                                                                                                                
                                                                                                                               

Any idea why?]]></description>
		<content:encoded><![CDATA[<p>Good scripts Jonathan thanks.</p>
<p>One question &#8211; I have some blocks that are marked as &#8216;free&#8217; by your script but rebuilding Index or moving tables into the tablespace does not use them. I have 50% free in the tablespace but cannot move segments into these free blocks so cannot reduce the datafile.</p>
<p>e.g.</p>
<p>11                     250889                 385544                 free                           free<br />
&#8230;<br />
11                     385673                 412936                 free                           free<br />
&#8230;<br />
11                     413065                 507912                 free                           free                                                                                                                                </p>
<p>Any idea why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-43045</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 11 Dec 2011 15:15:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-43045</guid>
		<description><![CDATA[Landon,

Moving lob segments is a pain, because they tend to be quite big and moving them is a lot of work.

If they&#039;re in ASSM tablespaces you may get lucky by shrinking them (shrink space), but this can generate a lot of undo and redo, and although it may free up some extents, the ones that are freed may not be at the critical end of the tablespace. For example:
[sourcecode]
alter table test_lobs  modify lob(text_content) (shrink space);
[/sourcecode]
As far as I know, the only alternative is to move the table and its lob segments at the same time. For example:
[sourcecode]
alter table test_lobs move 
lob(text_content) store as (tablespace test_8k_assm);
[/sourcecode]
This command will rebuild the table in the current tablespace, and rebuild the lob segment and lobindex segment in tablespace test_8k_assm.]]></description>
		<content:encoded><![CDATA[<p>Landon,</p>
<p>Moving lob segments is a pain, because they tend to be quite big and moving them is a lot of work.</p>
<p>If they&#8217;re in ASSM tablespaces you may get lucky by shrinking them (shrink space), but this can generate a lot of undo and redo, and although it may free up some extents, the ones that are freed may not be at the critical end of the tablespace. For example:</p>
<pre class="brush: plain; title: ; notranslate">
alter table test_lobs  modify lob(text_content) (shrink space);
</pre>
<p>As far as I know, the only alternative is to move the table and its lob segments at the same time. For example:</p>
<pre class="brush: plain; title: ; notranslate">
alter table test_lobs move 
lob(text_content) store as (tablespace test_8k_assm);
</pre>
<p>This command will rebuild the table in the current tablespace, and rebuild the lob segment and lobindex segment in tablespace test_8k_assm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Landon Statis</title>
		<link>http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/#comment-42907</link>
		<dc:creator><![CDATA[Landon Statis]]></dc:creator>
		<pubDate>Wed, 07 Dec 2011 16:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=2999#comment-42907</guid>
		<description><![CDATA[This is a great article.  However, how would you move LOBSEGMENT types to free up space?  I have several LOBSEGMENTS (SYS_LOB0000493391C00006$$) and want to move them to free up space.

Please advise, and thanks!]]></description>
		<content:encoded><![CDATA[<p>This is a great article.  However, how would you move LOBSEGMENT types to free up space?  I have several LOBSEGMENTS (SYS_LOB0000493391C00006$$) and want to move them to free up space.</p>
<p>Please advise, and thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
