DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: flash back query and timestamp problem

  1. #1
    Join Date
    Jul 2006
    Posts
    96

    flash back query and timestamp problem

    I have given the following

    create table flash_test(a number(3) primary key,b number(3));

    insert into flash_test values(1,2);

    insert into flash_test values(10,14);

    insert into flash_test values(19,22);

    commit;


    select * from flash_test;

    A B
    ---- ----------
    1 2
    10 14
    19 22

    now the time and date is 14-jul-09:06:35:25


    after 5 minites

    insert into flash_test values(31,34);

    insert into flash_test values(35,37);

    commit;

    on giving the following command

    select * from flash_test as of timestamp
    to_timestamp('14-jul-09:06:35:25','dd-mon-yy:hh:mi:ss')

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

    why plz suggest?

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    well the table definition changed - nothing you can do

  3. #3
    Join Date
    Jul 2006
    Posts
    96
    But i have not changed the definition.
    I gave the the steps exactly what i have written previously?
    How this has happend?


    Thanks

  4. #4
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    2 things i can think of..

    1) Flash back needs ROW MOVEMENT enabled on table
    so either create your table with row movement enabled or alter it after creating

    CREATE TABLE flash_test ENABLE ROW MOVEMENT(a number(3) primary key,b number(3));

    just check the syntax else you can alter it after normal creation.

    alter TABLE flash_test ENABLE ROW MOVEMENT;

    2) I read somewhere that you have to wait till SCN advances for to do flashback else you will get error as u got.

    Having created our table, we should wait a few minutes to allow the SCN to advance. Attempting to flashback a new table straight away can result in ORA-01466: unable to read data - table definition has changed.

    http://www.oracle-developer.net/display.php?id=313
    Rgds
    Parag

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width