ORA_ROWSCN continues to increase without any DML

Hi Experts,

I use ORA_ROWSCN in ETL for the incremental data capture.
Problem is that the ORA_ROWSCN continue to increase for some table without any DML.
Table have ROWDEPENDENCIES.
There is no audit, trigger, or batch running on the tables.
Database is 11.2.0.3 on Windows 64 bit OS.
ETLs perform DML heavy overnight. During the day, max (ORA_ROWSCN) continues to rise for a few tables.

I noticed that during the questioning of a few paintings, SCN_TO_TIMESTAMP (max (ORA_ROWSCN)) has shown the current timestamp.

Can cause the "delayed block drain plug" this?
If this is not the case, is it then any other bug cause or identified?
Is there enough reliable ORA_ROWSCN?

Thank you
Santosh kumar

Welcome to the forum!
>
I use ORA_ROWSCN in ETL for the incremental data capture.
Problem is that the ORA_ROWSCN continue to increase for some table without any DML.
Table have ROWDEPENDENCIES.
There is no audit, trigger, or batch running on the tables.
Database is 11.2.0.3 on Windows 64 bit OS.
ETLs perform DML heavy overnight. During the day, max (ORA_ROWSCN) continues to rise for a few tables.

I noticed that during the questioning of a few paintings, SCN_TO_TIMESTAMP (max (ORA_ROWSCN)) has shown the current timestamp.

Can cause the "delayed block drain plug" this?
If this is not the case, is it then any other bug cause or identified?
Is there enough reliable ORA_ROWSCN?
>
Congrats on being one of the few to ask a question which is, as Arte Johnson (of Laugh-In fame) would say, "very interesting".

Unfortunately for us, you have also provided your own answer! ;)

Drain plug can cause that? Yes - one of the oddities of the drain plug delay block even with a table by using ROWDEPENDENCIES is that Oracle may not always determine the exact SCN and therefore can use slightly more high when finished.

Reliable? Yes - ORA_ROWSCN is reliable enough. But, as you will see, you must force the Oracle to drain plug blocks before use ORA_ROWSCN to query the changes.

The best discussion, which includes the code example, is on the site of challenge from PL/SQL to a fault, a year or two it is
"Impact of the Serializable Transaction not seen by players (9622).
http://PLSQL-challenge.blogspot.com/2012/01/rowdependencies-impact-not-seen-by.html

Anyone with enough interest should read the entire article, long and many answers. You will find them VERY informative. I suggest you add this bookmark to your "Oracle Toolbox.

I included only a short extract conclusions regarding your question here and the code example illustrating the it.
>
Smail:

I wonder if the ROWDEPENDENCIES guarantees 100% accuracy
ORA_ROWSCN for each line.
As far as I understand it, it can still generate false positives, but much less, because each row has its own ORA_ROWSCN that is NOT affected if other lines in the block are updated or locked/jerks, but still can be slightly higher than that of true to the line itself when Oracle it cannot determine precisely when cleaning
>
And the answer with the code
>
_Nikotin:

but maybe still slightly higher than that of true to the line itself when Oracle it cannot determine precisely when cleaning.

Yes, here is the example of the impact of the delay block drain plug:

drop table plch_test;
drop table plch_test2;

create table plch_test (number, varchar2 (100) tilte, number of val) rowdependencies;

Start
insert into plch_test values (1, 'creation and validation at level 1', 0);
insert into plch_test values (2, 'to update and commit to step 2', 0);
commit;
end;
/

update the value val = 1 plch_test where a = 2;

change the built-in system buffer_cache;

commit;

create table plch_test2 (number, varchar2 (100) tilte, number of val) rowdependencies;

Start
insert into plch_test2 values (3, 'create and commit to step 3', 0);
insert into plch_test2 values (4, 'to update and commit 1e5 times in step 4', 0);
commit;
end;
/

Start
because me in 1... loop 1E5
Update plch_test2 the value val = val + 1 where a = 4;
commit;
end loop;
end;
/

Select t.*, Yvert plch_test2 ora_rowscn t
Union of all the
Select t.*, plch_test ora_rowscn t
order by SNA;

After that, you can see that steps 2 and 3 are reversed in the query result:

SQL > select t.*, Yvert plch_test2 ora_rowscn t
2 Union all the
3. Select t.*, plch_test ora_rowscn t
4 order of SNA;

A VAL TILTE SNA
---------- -------------------------------------------- ---------- ----------
1. create and validation, to 1 0 1998971227 step
3. create and validation, to step 3 0 1998971254
2 update and validation, 2 1 1999009794 step
4 update and commit times in step 4 100000 1999224125 1e5
>
You can see from the above result to the effect that you get

Tags: Database

Similar Questions

Maybe you are looking for