<?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/"
		>
<channel>
	<title>Comments on: Transportable tablespaces and ROWID uniqueness</title>
	<atom:link href="http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/</link>
	<description>Oracle troubleshooting, internals and performance tuning</description>
	<lastBuildDate>Mon, 15 Mar 2010 01:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rajorshi</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-1236</link>
		<dc:creator>Rajorshi</dc:creator>
		<pubDate>Thu, 19 Mar 2009 10:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-1236</guid>
		<description>Thank you so much Tanel.

It works for me. I wanted this to write a procedure that will give me the density of rows in a block for a table.
So, that I can have a count of rows in a block before and after a purge job.

regards Raj</description>
		<content:encoded><![CDATA[<p>Thank you so much Tanel.</p>
<p>It works for me. I wanted this to write a procedure that will give me the density of rows in a block for a table.<br />
So, that I can have a count of rows in a block before and after a purge job.</p>
<p>regards Raj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-1041</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Tue, 24 Feb 2009 22:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-1041</guid>
		<description>Hi Raj,

DBMS_ROWID package does this for you.

You can run something like this:

select
    dbms_rowid.ROWID_RELATIVE_FNO(rowid) rfile#
  , dbms_rowid.ROWID_BLOCK_NUMBER(rowid) block#
  , dbms_rowid.ROWID_ROW_NUMBER(rowid)   row#
from
    mytable
where
    id = 100
/</description>
		<content:encoded><![CDATA[<p>Hi Raj,</p>
<p>DBMS_ROWID package does this for you.</p>
<p>You can run something like this:</p>
<p>select<br />
    dbms_rowid.ROWID_RELATIVE_FNO(rowid) rfile#<br />
  , dbms_rowid.ROWID_BLOCK_NUMBER(rowid) block#<br />
  , dbms_rowid.ROWID_ROW_NUMBER(rowid)   row#<br />
from<br />
    mytable<br />
where<br />
    id = 100<br />
/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajorshi</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-1037</link>
		<dc:creator>Rajorshi</dc:creator>
		<pubDate>Tue, 24 Feb 2009 18:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-1037</guid>
		<description>Hi Tanel

A very interesting revelation which even Oracle would be surprised to know.

I have very trivial question for you. Is there a way to decode the blockid that a row resides in from its rowid by using x$ table or v$ view and without restoring to block dumps?

thanks and regards
Raj</description>
		<content:encoded><![CDATA[<p>Hi Tanel</p>
<p>A very interesting revelation which even Oracle would be surprised to know.</p>
<p>I have very trivial question for you. Is there a way to decode the blockid that a row resides in from its rowid by using x$ table or v$ view and without restoring to block dumps?</p>
<p>thanks and regards<br />
Raj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavan Kumar N</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-664</link>
		<dc:creator>Pavan Kumar N</dc:creator>
		<pubDate>Mon, 24 Nov 2008 14:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-664</guid>
		<description>H Tanel,

I heard you name from some many posters and referred your Blog. You are like &quot;Jonathan Lewis&quot;.

I am very inspired by your posts.

Really Great... !!

Thanks</description>
		<content:encoded><![CDATA[<p>H Tanel,</p>
<p>I heard you name from some many posters and referred your Blog. You are like &#8220;Jonathan Lewis&#8221;.</p>
<p>I am very inspired by your posts.</p>
<p>Really Great&#8230; !!</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Js</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-662</link>
		<dc:creator>Js</dc:creator>
		<pubDate>Mon, 17 Nov 2008 14:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-662</guid>
		<description>Hi Tanel,

I have been a silent reader of your blog.

Today, I am curious to know that how much time you just spend to explore all these things apart your job.

Or you job gives you all this exposure :)

Actually, I am also interested but very much occupied with daily routine jobs at office and could not spend time to upgrade myself.

But when I saw people like you ...  I am happy but want to know . how you manage ?


Thanks -</description>
		<content:encoded><![CDATA[<p>Hi Tanel,</p>
<p>I have been a silent reader of your blog.</p>
<p>Today, I am curious to know that how much time you just spend to explore all these things apart your job.</p>
<p>Or you job gives you all this exposure :)</p>
<p>Actually, I am also interested but very much occupied with daily routine jobs at office and could not spend time to upgrade myself.</p>
<p>But when I saw people like you &#8230;  I am happy but want to know . how you manage ?</p>
<p>Thanks -</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-651</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Fri, 24 Oct 2008 10:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-651</guid>
		<description>Mladen,

I think you misunderstood the point of my article.

Oracle concepts guide apparently doesn&#039;t state this uniqueness thing clearly enough - as I hadn&#039;t noticed it :)

Btw, rowids are actually stored - in indexes for example. As I mentioned, global indexes on partitioned tables store extended rowid. However as there&#039;s no uniqueness across tablespaces, then more information is needed for rowid -&gt; physical file block translation in addition to just rowid. And this info probably comes from dictionary cache (dc_segments).

Also there are next-rowpiece pointers for chained and migrated rows which have only *relative* DBA + row# in them, so these need little logic as well which would translate the relative file# to an absolute file#.

Transporting a tablespace to the same database was easiest and most straightforward test case - and it served its purpose, it proved a case how rowids can be non-unique.

If something is possible, it&#039;s only matter of time before it happens.

So, to recap: the whole reason why we have rowids in Oracle is having secondary access paths like indexes - which DO have the rowids *stored* in them! If we didn&#039;t store them, the index would be useless!</description>
		<content:encoded><![CDATA[<p>Mladen,</p>
<p>I think you misunderstood the point of my article.</p>
<p>Oracle concepts guide apparently doesn&#8217;t state this uniqueness thing clearly enough &#8211; as I hadn&#8217;t noticed it :)</p>
<p>Btw, rowids are actually stored &#8211; in indexes for example. As I mentioned, global indexes on partitioned tables store extended rowid. However as there&#8217;s no uniqueness across tablespaces, then more information is needed for rowid -&gt; physical file block translation in addition to just rowid. And this info probably comes from dictionary cache (dc_segments).</p>
<p>Also there are next-rowpiece pointers for chained and migrated rows which have only *relative* DBA + row# in them, so these need little logic as well which would translate the relative file# to an absolute file#.</p>
<p>Transporting a tablespace to the same database was easiest and most straightforward test case &#8211; and it served its purpose, it proved a case how rowids can be non-unique.</p>
<p>If something is possible, it&#8217;s only matter of time before it happens.</p>
<p>So, to recap: the whole reason why we have rowids in Oracle is having secondary access paths like indexes &#8211; which DO have the rowids *stored* in them! If we didn&#8217;t store them, the index would be useless!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stig</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-652</link>
		<dc:creator>Stig</dc:creator>
		<pubDate>Thu, 23 Oct 2008 07:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-652</guid>
		<description>Mladen,
Yes, you&#039;re right - the rowid IS computed. But the computation is a deterministic function as it would otherwise fail in a global index for a partitioned object, which can have multiple segments.
The computation is merely a rather simple function to break the old 1022 files limitation, so any rowid in Tanels exampel is internally transformed into a physical rowid for the desired physical file and data object.
Issues can still arise if you get tablespaces from several databases, which you comprise into a single partitioned table if the data object id (which is local to the tablespace and datafile) already exists as a segment in the partitioned table. This would give you the error I showed in my previous comment.
In other words: You can get into trouble even without having duplicate rowid&#039;s in the database. You just need 2 tablespaces each with an object with the same physical data object id for inclusion into the same partitioned table.</description>
		<content:encoded><![CDATA[<p>Mladen,<br />
Yes, you&#8217;re right &#8211; the rowid IS computed. But the computation is a deterministic function as it would otherwise fail in a global index for a partitioned object, which can have multiple segments.<br />
The computation is merely a rather simple function to break the old 1022 files limitation, so any rowid in Tanels exampel is internally transformed into a physical rowid for the desired physical file and data object.<br />
Issues can still arise if you get tablespaces from several databases, which you comprise into a single partitioned table if the data object id (which is local to the tablespace and datafile) already exists as a segment in the partitioned table. This would give you the error I showed in my previous comment.<br />
In other words: You can get into trouble even without having duplicate rowid&#8217;s in the database. You just need 2 tablespaces each with an object with the same physical data object id for inclusion into the same partitioned table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mladen Gogala</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-653</link>
		<dc:creator>Mladen Gogala</dc:creator>
		<pubDate>Wed, 22 Oct 2008 18:52:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-653</guid>
		<description>Tanel, I was under the impression that ROWID column is computed and not stored. If the column is computed, then there is no need to recode it in the transported tablespace. The concepts manual clearly states that extended rowid is tablespace relative. That would explain the appearance of the same rowid in 2 different tablespaces.
You did transport the tablespace into the same database. That would preserve physical characteristics enough to allow the same rowid.
In other words, rowid pseudo-column is computed at the time of query and thus should couse no issue when the tablespace is transported.</description>
		<content:encoded><![CDATA[<p>Tanel, I was under the impression that ROWID column is computed and not stored. If the column is computed, then there is no need to recode it in the transported tablespace. The concepts manual clearly states that extended rowid is tablespace relative. That would explain the appearance of the same rowid in 2 different tablespaces.<br />
You did transport the tablespace into the same database. That would preserve physical characteristics enough to allow the same rowid.<br />
In other words, rowid pseudo-column is computed at the time of query and thus should couse no issue when the tablespace is transported.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tanelp</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-654</link>
		<dc:creator>tanelp</dc:creator>
		<pubDate>Wed, 22 Oct 2008 15:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-654</guid>
		<description>@Tom: yep I sure would rebuild the indexes in alter table move case (which would make this post-processing step even longer)

@Stig: Very cool! I never had thought of that (and I didn&#039;t know about this conflict error message before). Thanks for telling that.</description>
		<content:encoded><![CDATA[<p>@Tom: yep I sure would rebuild the indexes in alter table move case (which would make this post-processing step even longer)</p>
<p>@Stig: Very cool! I never had thought of that (and I didn&#8217;t know about this conflict error message before). Thanks for telling that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stig</title>
		<link>http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/comment-page-1/#comment-657</link>
		<dc:creator>Stig</dc:creator>
		<pubDate>Wed, 22 Oct 2008 08:49:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2008/10/21/transportable-tablespaces-and-rowid-uniqueness/#comment-657</guid>
		<description>Tried a little experiment just to see if this was watertight!

The question:
What if the same tablespace (with the same table renamed appropriately) was imported to the same database twice for being added to a partitioned table?
This construct could actually be interesting in datawarehousing although it would give duplicat rowid&#039;s within the very same table.

Luckily Oracle thought on that as well, yeilding ORA-19728 &quot;data object number conflict between table %s and partition %s in table %s&quot;.
So we are prevented from having more than one partition (=segment) with the same data_object_id.

Just my 2c to demonstrate the difference between a data object and a table as a table may have more data objects (ie. segments) and to tie up a loose end that wasn&#039;t tried.

Thanks for the inspiration for this little additional test.</description>
		<content:encoded><![CDATA[<p>Tried a little experiment just to see if this was watertight!</p>
<p>The question:<br />
What if the same tablespace (with the same table renamed appropriately) was imported to the same database twice for being added to a partitioned table?<br />
This construct could actually be interesting in datawarehousing although it would give duplicat rowid&#8217;s within the very same table.</p>
<p>Luckily Oracle thought on that as well, yeilding ORA-19728 &#8220;data object number conflict between table %s and partition %s in table %s&#8221;.<br />
So we are prevented from having more than one partition (=segment) with the same data_object_id.</p>
<p>Just my 2c to demonstrate the difference between a data object and a table as a table may have more data objects (ie. segments) and to tie up a loose end that wasn&#8217;t tried.</p>
<p>Thanks for the inspiration for this little additional test.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
