Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: flashback question
Eugene wrote:
> Hi all,
> I have a question about flashback. For some reason it doesn't work?!
> Here is what I do:
>
> show parameter undo_retention;
> NAME TYPE VALUE
> ------------------------------------ ----------- -----
> undo_retention integer 5400
>
> create table t (varchar2(1));
> Table created.
>
> select dbms_flashback.get_system_change_number from dual;
> GET_SYSTEM_CHANGE_NUMBER
> ------------------------
> 2927483661
>
> insert into t values (1);
> 1 row created.
>
> insert into t values (2);
> 1 row created.
>
> select dbms_flashback.get_system_change_number from dual;
> GET_SYSTEM_CHANGE_NUMBER
> ------------------------
> 2927483700
>
> insert into t values(3);
> 1 row created.
>
> select dbms_flashback.get_system_change_number from dual;
> GET_SYSTEM_CHANGE_NUMBER
> ------------------------
> 2927483714
>
> commit;
> Commit complete.
>
> select * from t;
> A
> -
> 1
> 2
> 3
>
> delete from t;
> 3 rows deleted.
>
> commit;
> Commit complete.
>
> select * from t;
> no rows selected
>
> select * from t as of scn 2927483700;
> select * from t as of scn 2927483700
> *
> ERROR at line 1:
> ORA-01466: unable to read data - table definition has changed
>
> ----------------------------------------------
> Why didn't it work??? Did I do something wrong?
> ----------------------------------------------
>
> Thanks,
> Eugene
Look at the examples at www.psoug.org, Morgan's Library
For flashback query you must have an enabled flashback area.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Mon Aug 08 2005 - 23:48:28 CDT