Re: ora_rowscn changing for non-updated rows?

From: <sybrandb_at_hccnet.nl>
Date: Thu, 30 Jul 2009 08:06:46 +0200
Message-ID: <ttd275lc9re08q3qh07io1dtg06lo94vpd_at_4ax.com>



On 29 Jul 2009 23:23:01 GMT, mh_at_pixar.com wrote:

>I am inserting a row into a table, and seeing the ora_rowscn
>change for all the rows in the table.
>
>1. Is this because all the (small) rows are in the same
> block, and the SCN is tied to the block?
>
>2. Is there a better way of mapping the change time for
> a row, besided adding a timestamp column and updating
> that column in a trigger?
>
>Many TIA!
>Mark
>
>
>desc a;
>select ora_rowscn, a.* from a;
>insert into a values(7);
>commit;
>select ora_rowscn, a.* from a;
>
>Name Null Type
>---- ---- ----
> A NUMBER(1)
>
>ORA_ROWSCN A
>---------------------- ----------------------
>14032868105 1
>14032868105 2
>
>ORA_ROWSCN A
>---------------------- ----------------------
>14032868107 7
>14032868107 1
>14032868107 2

Obviously the SCN is not tied to a block. The above output is not conclusive it is, as you don't post the -old style rowid- of the affected rows. When the table has row movement enabled, the rowid is not guaranteed to stay the same anyway.

2 You are aware ora_rowscan does not provide a permanent timestamp? So the answer to your question is: the only *guaranteed* method is a timestamp.

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Thu Jul 30 2009 - 01:06:46 CDT

Original text of this message