Skip to main content
Question

ORA_ROWSCN Where Oracle Stores the Time Row updated

  • August 20, 2024
  • 1 reply
  • 38 views

haritha.waidyaratne
Sidekick
Forum|alt.badge.img+5

This might be useful in tables where rowvesrion doesn’t store this information. But, does anyone have clue as to why

SELECT TIMESTAMP_TO_SCN(SYSDATE) FROM DUAL;

works but

SELECT TIMESTAMP_TO_SCN(SYSDATE + 15) FROM DUAL;

doesn’t?

​​​​​​​Thank you.

1 reply

Forum|alt.badge.img+19
  • Superhero (Employee)
  • 488 replies
  • August 20, 2024

The SCN, system Change Number, is not possible to use in the future. (Only a few seconds in the future seems to work when I test.) I can’t see why you need to do that since no records that exists now are changed in the future?

 

Also, the SCN seems only to be remembered a while so you can’t convert it for too old SCN’s.

Especially the “Note” section in the Oracle documentation below describes how it is remembered:

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/TIMESTAMP_TO_SCN.html#GUID-58796E1A-9943-4966-96E6-78B636BD2859


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings