Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Flashback query, can't seem to get 'versions between scn' to work

GusoraJan 26 2016 — edited Jan 27 2016

Created a simple table alpha as a test. When I try to do a flashback query using 'versions between' and specify the scn I get nowhere and I'm scratching my head as to why it doesn't compute?

orcl > drop table alpha;

Table dropped.

orcl > create table alpha(cola varchar2(50)) enable row movement, rowdependencies;

Table created.

orcl > insert into alpha values(100);

1 row created.

orcl > commit;

Commit complete.

orcl > execute dbms_lock.sleep(20);

PL/SQL procedure successfully completed.

orcl > insert into alpha values(200);

1 row created.

orcl > commit;

Commit complete.

orcl > select ora_rowscn, cola from alpha;

ORA_ROWSCN COLA

---------- --------------------------------------------------

   9843480 100

   9843488 200

orcl > select * from alpha versions between scn minvalue and maxvalue;

COLA

--------------------------------------------------

200

100

orcl > select * from alpha versions between scn 9843480 and 9843488;

select * from alpha versions between scn 9843480 and 9843488

              *

ERROR at line 1:

ORA-01466: unable to read data - table definition has changed

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2016
Added on Jan 26 2016
8 comments
1,771 views