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!

get min/max value for VERSIONS BETWEEN SCN in flashback

AlexAndSep 5 2017 — edited Sep 5 2017

hi all

try to play with flashback and try to find min available value for scn

so

select * from v$version where rownum=1

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production 

get current scn

SELECT current_scn FROM v$database;

12347182

and for table

  SELECT versions_xid, versions_startscn, versions_starttime, versions_endscn, versions_endtime, versions_xid, versions_operation, t.*

     FROM DS_MASTER

     VERSIONS BETWEEN SCN 12347182 AND 12347182

     t

5 йцукен 01.09.2017

2 new text 2 01.09.2017

3 text 3 01.09.2017

4 text 4 01.09.2017

1 new text 1 01.09.2017

try to get minimal value for scn ( looks like it's not minimal value but no idea what it is )

SELECT oldest_flashback_scn FROM  v$flashback_database_log;

12246557

and data beggining from it

SELECT versions_xid, versions_startscn, versions_starttime, versions_endscn, versions_endtime, versions_xid, versions_operation, t.*

     FROM DS_MASTER

     VERSIONS BETWEEN SCN 12246557 AND 12347182

     t

"invalid lower limit snapshot expression"

there is some predefined values minvalue , maxvalue

SELECT versions_xid, versions_startscn, versions_starttime, versions_endscn, versions_endtime, versions_xid, versions_operation, t.*

     FROM DS_MASTER

     VERSIONS BETWEEN SCN minvalue AND maxvalue

     t

5 йцукен 01.09.2017

2 new text 2 01.09.2017

3 text 3 01.09.2017

4 text 4 01.09.2017

1 new text 1 01.09.2017

so how to correctly get min ( and may be max) value for scn to exclude possibility for "invalid lower limit snapshot expression" ?

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2017
Added on Sep 5 2017
2 comments
1,763 views