You Asked
Dear Tom,
Is there a way to determine the last SCN applicable to a particular block? I'm sure logminer will do this (reading the fine documentation) but I wonderered if this info is more readly available from the catalog or system tables.
and Tom said...
Not in 9i, in 10g -- yes using ora_rowscn.
ops$tkyte@ORA10G>
ops$tkyte@ORA10G> create table t as select * from all_objects where rownum <= 500 order by object_id;
Table created.
ops$tkyte@ORA10G>
ops$tkyte@ORA10G> select to_char( max(scn), '999,999,999,999,999,999' ), block
2 from (
3 select ora_rowscn scn, dbms_rowid.rowid_block_number(rowid) block
4 from t
5 )
6 group by block
7 /
TO_CHAR(MAX(SCN),'999,99 BLOCK
------------------------ ----------
8,204,827,991,363 1876
8,204,827,991,363 1877
8,204,827,991,363 1878
8,204,827,991,363 1879
8,204,827,991,363 1880
8,204,827,991,363 1881
6 rows selected.
ops$tkyte@ORA10G>
ops$tkyte@ORA10G>
ops$tkyte@ORA10G> update t set object_id = object_id where object_id = (select min(object_id) from t);
1 row updated.
ops$tkyte@ORA10G> commit;
Commit complete.
ops$tkyte@ORA10G> update t set object_id = object_id where object_id = (select max(object_id) from t);
1 row updated.
ops$tkyte@ORA10G> commit;
Commit complete.
ops$tkyte@ORA10G>
ops$tkyte@ORA10G> select to_char( max(scn), '999,999,999,999,999,999' ), block
2 from (
3 select ora_rowscn scn, dbms_rowid.rowid_block_number(rowid) block
4 from t
5 )
6 group by block
7 /
TO_CHAR(MAX(SCN),'999,99 BLOCK
------------------------ ----------
8,204,827,991,375 1876
8,204,827,991,363 1877
8,204,827,991,363 1878
8,204,827,991,363 1879
8,204,827,991,363 1880
8,204,827,991,378 1881
6 rows selected.
in 9i, i believe we'd be at the stage of "dumping blocks" to walk transaction information.
Rating
(6 ratings)
Is this answer out of date? If it is, please let us know via a Comment