Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-30052 and AS OF SCN

Anuj GargFeb 22 2024

Hello,

I have inserted a record into a test table. Flashback is enabled for the database. I have not changed the default retention period for testing purposes only.

The below SELECT query returns the number 1.

SELECT count(*) FROM myschema.FBTest AS OF SCN 1524819

COUNT(*)|
--------+
1|

The below query fails with ORA-30052 error.

SELECT VERSIONS_OPERATION, VERSIONS_XID, ROWID, NAME, ID FROM myschema.FBTEST VERSIONS BETWEEN SCN 1524700 AND 1528578 WHERE ROWID = 'AAAR9MAAHAAAACHAAA'

SQL Error [30052] [99999]: ORA-30052: invalid lower limit snapshot expression

You can see that the SCN 1524819 lies between 1524700 and 1528578.

My question is - If SCN is not available in the flashback and the retention period has expired, how does SELECT count(*) fetching value with ASOFSCN?

Thanks,

Comments
Post Details
Added on Feb 22 2024
3 comments
338 views