This discussion is archived
4 Replies Latest reply: May 6, 2008 4:50 PM by Madrid RSS

Flashback Query

325965 Newbie
Currently Being Moderated
I am on 10gr2. I was trying flashback query and what is that I am missing?

SQL> show parameter undo

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> select no, substr(name, 1, 50) from tbl1;

NO SUBSTR(NAME,1,50)
---------- --------------------------------------------------
1 Name1

SQL> select to_char(sysdate,'yyyy-mm-dd hh:mi:ss') from dual;

TO_CHAR(SYSDATE,'YY
-------------------
2008-05-06 04:41:30

SQL> update tbl1 set name = 'Name2';

1 row updated.

SQL> commit;

Commit complete.

SQL> select * from tbl1 as of timestamp to_timestamp('2008-05-06 04:41:30', 'yyyy-mm-dd hh:mi:ss');
select * from tbl1 as of timestamp to_timestamp('2008-05-06 04:41:30', 'yyyy-mm-dd hh:mi:ss')
*
ERROR at line 1:
ORA-01466: unable to read data - table definition has changed


SQL>